The switch to explicit FLAVORS is almost complete, there are two
remaining ports, luaposix and lualdoc.

lualdoc is packaged as a library that supports flavors, but afaik it is
a standalone tool.  Debian for example packages it as "lua-ldoc", not
"lua5.1-ldoc".

Here's a diff to switch it to a standalone tool.  Since x11/awesome is
its only consumer, I used MODLUA_VERSION = 5.2 so that people that build
from source don't need to install two lua versions (well, that's
cheap...).

I added a @pkgpath so that people who have lua52ldoc installed can
transparently upgrade, but should I also add bin/lua51 and bin/lua52
symlinks?  I'd prefer not...

Bonus: x11/awesome/patches loses weight.

Thoughts?


Index: devel/Makefile
===================================================================
RCS file: /d/cvs/ports/devel/Makefile,v
retrieving revision 1.1551
diff -u -p -r1.1551 Makefile
--- devel/Makefile      16 Oct 2016 23:52:31 -0000      1.1551
+++ devel/Makefile      17 Oct 2016 17:25:36 -0000
@@ -434,7 +434,6 @@
      SUBDIR += luafs,lua52
      SUBDIR += luafs,lua53
      SUBDIR += lualdoc
-     SUBDIR += lualdoc,lua52
      SUBDIR += luapack
      SUBDIR += luapack,lua52
      SUBDIR += luaposix
Index: devel/lualdoc/Makefile
===================================================================
RCS file: /d/cvs/ports/devel/lualdoc/Makefile,v
retrieving revision 1.16
diff -u -p -r1.16 Makefile
--- devel/lualdoc/Makefile      26 Aug 2016 07:51:49 -0000      1.16
+++ devel/lualdoc/Makefile      17 Oct 2016 17:29:17 -0000
@@ -7,6 +7,7 @@ GH_PROJECT =    LDoc
 GH_TAGNAME =   1.4.5
 PKGNAME =      lualdoc-${GH_TAGNAME}
 CATEGORIES =   devel
+REVISION =     0
 
 HOMEPAGE =     http://stevedonovan.github.io/ldoc/
 
@@ -18,9 +19,10 @@ PERMIT_PACKAGE_CDROM =Yes
 MODULES =      lang/lua
 
 MODLUA_RUN_DEPENDS =   devel/lua-penlight
+MODLUA_SA =    Yes
+MODLUA_VERSION = 5.2
 
 NO_BUILD =     Yes
-
 NO_TEST =      Yes
 
 do-install:
@@ -35,7 +37,6 @@ do-install:
                ${MODLUA_DATADIR}/ldoc/html/
        ${INSTALL_DATA} ${WRKSRC}/doc/*.md ${MODLUA_DOCDIR}
        ${INSTALL_DATA} ${WRKSRC}/readme.md ${MODLUA_DOCDIR}
-       ${SUBST_PROGRAM} \
-               ${WRKSRC}/ldoc.lua ${PREFIX}/bin/ldoc${MODLUA_DEP_VERSION}
+       ${SUBST_PROGRAM} ${WRKSRC}/ldoc.lua ${PREFIX}/bin/ldoc
 
 .include <bsd.port.mk>
Index: devel/lualdoc/pkg/PLIST
===================================================================
RCS file: /d/cvs/ports/devel/lualdoc/pkg/PLIST,v
retrieving revision 1.4
diff -u -p -r1.4 PLIST
--- devel/lualdoc/pkg/PLIST     26 Aug 2016 07:51:49 -0000      1.4
+++ devel/lualdoc/pkg/PLIST     17 Oct 2016 17:23:15 -0000
@@ -1,5 +1,6 @@
 @comment $OpenBSD: PLIST,v 1.4 2016/08/26 07:51:49 dcoppa Exp $
-bin/ldoc${MODLUA_DEP_VERSION}
+@pkgpath devel/lualdoc,lua52
+bin/ldoc
 share/doc/${FULLPKGNAME}/
 share/doc/${FULLPKGNAME}/doc.md
 share/doc/${FULLPKGNAME}/readme.md
Index: x11/awesome/Makefile
===================================================================
RCS file: /d/cvs/ports/x11/awesome/Makefile,v
retrieving revision 1.102
diff -u -p -r1.102 Makefile
--- x11/awesome/Makefile        22 Aug 2016 13:45:09 -0000      1.102
+++ x11/awesome/Makefile        17 Oct 2016 14:18:37 -0000
@@ -38,13 +38,12 @@ LIB_DEPENDS=                devel/libexecinfo \
                        x11/dbus \
                        x11/libxdg-basedir
 
-MODLUA_BUILD_DEPENDS=  devel/lua-lgi \
-                       devel/lualdoc
+MODLUA_BUILD_DEPENDS=  devel/lua-lgi
 
-BUILD_DEPENDS=         textproc/asciidoc>=8.4.5 \
+BUILD_DEPENDS=         devel/lualdoc \
+                       textproc/asciidoc>=8.4.5 \
                        textproc/xmlto \
-                       graphics/ImageMagick \
-                       devel/doxygen
+                       graphics/ImageMagick
 
 MODLUA_RUN_DEPENDS=    devel/lua-lgi
 
Index: x11/awesome/patches/patch-awesomeConfig_cmake
===================================================================
RCS file: /d/cvs/ports/x11/awesome/patches/patch-awesomeConfig_cmake,v
retrieving revision 1.18
diff -u -p -r1.18 patch-awesomeConfig_cmake
--- x11/awesome/patches/patch-awesomeConfig_cmake       22 Aug 2016 13:45:09 
-0000      1.18
+++ x11/awesome/patches/patch-awesomeConfig_cmake       17 Oct 2016 17:27:57 
-0000
@@ -1,6 +1,6 @@
 $OpenBSD: patch-awesomeConfig_cmake,v 1.18 2016/08/22 13:45:09 dcoppa Exp $
 --- awesomeConfig.cmake.orig   Sun Mar  6 15:05:54 2016
-+++ awesomeConfig.cmake        Mon Aug 22 15:33:26 2016
++++ awesomeConfig.cmake        Mon Oct 17 19:27:40 2016
 @@ -16,12 +16,11 @@ option(COMPRESS_MANPAGES "compress manpages" ON)
  option(GENERATE_DOC "generate API documentation" ON)
  
@@ -19,7 +19,7 @@ $OpenBSD: patch-awesomeConfig_cmake,v 1.
  # }}}
  
  # {{{ Endianness
-@@ -43,29 +42,21 @@ macro(a_find_program var prg req)
+@@ -43,11 +42,7 @@ macro(a_find_program var prg req)
      endif()
  endmacro()
  
@@ -31,17 +31,7 @@ $OpenBSD: patch-awesomeConfig_cmake,v 1.
  # programs needed for man pages
  a_find_program(ASCIIDOC_EXECUTABLE asciidoc FALSE)
  a_find_program(XMLTO_EXECUTABLE xmlto FALSE)
- a_find_program(GZIP_EXECUTABLE gzip FALSE)
- # lua documentation
--a_find_program(LUA_EXECUTABLE lua FALSE)
--a_find_program(LDOC_EXECUTABLE ldoc FALSE)
--if(NOT LDOC_EXECUTABLE)
--    a_find_program(LDOC_EXECUTABLE ldoc.lua FALSE)
--endif()
-+a_find_program(LDOC_EXECUTABLE ldoc${MODLUA_DEP_VERSION} FALSE)
- # theme graphics
- a_find_program(CONVERT_EXECUTABLE convert TRUE)
- # doxygen
+@@ -64,8 +59,8 @@ a_find_program(CONVERT_EXECUTABLE convert TRUE)
  include(FindDoxygen)
  # pkg-config
  include(FindPkgConfig)
@@ -52,7 +42,7 @@ $OpenBSD: patch-awesomeConfig_cmake,v 1.
  # }}}
  
  # {{{ Check if documentation can be build
-@@ -113,14 +104,6 @@ elseif( EXISTS ${SOURCE_DIR}/.version_stamp )
+@@ -113,14 +108,6 @@ elseif( EXISTS ${SOURCE_DIR}/.version_stamp )
  endif()
  # }}}
  
@@ -67,7 +57,7 @@ $OpenBSD: patch-awesomeConfig_cmake,v 1.
  # {{{ Required libraries
  #
  # this sets up:
-@@ -189,7 +172,7 @@ else()
+@@ -189,7 +176,7 @@ else()
  endif()
  
  # Error check
@@ -76,7 +66,7 @@ $OpenBSD: patch-awesomeConfig_cmake,v 1.
      message(FATAL_ERROR "lua library not found")
  endif()
  
-@@ -264,16 +247,13 @@ endif()
+@@ -264,16 +251,13 @@ endif()
  if(DEFINED AWESOME_MAN_PATH)
     set(AWESOME_MAN_PATH ${AWESOME_MAN_PATH} CACHE PATH "awesome manpage 
directory")
  else()


-- 
jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF  DDCC 0DFA 74AE 1524 E7EE

Reply via email to