Index: Mk/Scripts/functions.sh =================================================================== --- Mk/Scripts/functions.sh +++ Mk/Scripts/functions.sh @@ -53,9 +53,11 @@ fi # Strip (owner,group,perm) from keywords + # Also strip subpackage marker. line="$(printf %s "$line" \ | sed -Ee 's/^@\([^)]*\)[[:space:]]+//' \ - -e 's/^(@[[:alpha:]]+)\([^)]*\)[[:space:]]+/\1 /')" + -e 's/^(@[[:alpha:]]+)\([^)]*\)[[:space:]]+/\1 /' \ + -e 's/^@@[[:alnum:]]+@@//')" case $line in @dir*|'@unexec rmdir'*|'@unexec /bin/rmdir'*) line="$(printf %s "$line" \ Index: Mk/bsd.port.mk =================================================================== --- Mk/bsd.port.mk +++ Mk/bsd.port.mk @@ -2219,6 +2219,7 @@ _PKGMESSAGES+= ${PKGMESSAGE} TMPPLIST?= ${WRKDIR}/.PLIST.mktmp +_PLIST?= ${WRKDIR}/.PLIST .if defined(PKG_NOCOMPRESS) PKG_SUFX?= .tar @@ -2608,20 +2609,61 @@ PKGREPOSITORYSUBDIR?= All PKGREPOSITORY?= ${PACKAGES}/${PKGREPOSITORYSUBDIR} -.if exists(${PACKAGES}) -PACKAGES:= ${PACKAGES:S/:/\:/g} -_HAVE_PACKAGES= yes -PKGFILE?= ${PKGREPOSITORY}/${PKGNAME}${PKG_SUFX} -.else -PKGFILE?= ${.CURDIR}/${PKGNAME}${PKG_SUFX} -.endif -WRKDIR_PKGFILE= ${WRKDIR}/pkg/${PKGNAME}${PKG_SUFX} # The "latest version" link -- ${PKGNAME} minus everthing after the last '-' PKGLATESTREPOSITORY?= ${PACKAGES}/Latest PKGBASE?= ${PKGNAMEPREFIX}${PORTNAME}${PKGNAMESUFFIX} PKGLATESTFILE= ${PKGLATESTREPOSITORY}/${PKGBASE}${PKG_SUFX} +_PKGS= ${PKGBASE} +.for p in ${SUBPACKAGES} +_PKGS+= ${PKGBASE}-${p} +.endfor + +.if !empty(SUBPACKAGES) && !defined(_DID_SUBPACKAGES_HELPERS) +_DID_SUBPACKAGES_HELPERS= yes +_SUBPACKAGE_HELPERS_FILE= DESCR PKGINSTALL PKGDEINSTALL PKGMESSAGE \ + PKGPREINSTALL PKGPOSTINSTALL PKGPREDEINSTALL PKGPOSTDEINSTALL \ + PKGPREUPGRADE PKGPOSTUPGRADE PKGUPGRADE + +. for v in ${_SUBPACKAGE_HELPERS_FILE} +${v}.${PKGBASE}= ${$v} +. endfor +COMMENT.${PKGBASE}= ${COMMENT} + +. for p in ${SUBPACKAGES} +# These overwrite the current value +. for v in ${_SUBPACKAGE_HELPERS_FILE} +${v}.${PKGBASE}-${p}?= ${$v}.$p +. endfor +_PKGMESSAGES.${p}= ${PKGMESSAGE}.${p} +# XXX: for testing, and maybe kept afterwards +. if !exists(${DESCR.${PKGBASE}-${p}}) +DESCR.${PKGBASE}-${p}= ${DESCR} +. endif +# XXX: Thoughts? +COMMENT.${PKGBASE}-${p}?= ${COMMENT} (subpkg: ${p}) +. endfor +.endif + + +.if exists(${PACKAGES}) +-PACKAGES:= ${PACKAGES:S/:/\:/g} +_HAVE_PACKAGES= yes +_PKGDIR= ${PKGREPOSITORY} +.else +_PKGDIR= ${.CURDIR} +.endif +. for p in ${_PKGS} +${p}_PKGFILE= ${_PKGDIR}/${p}-${PKGVERSION}${PKG_SUFX} +# FIXME: This should go away at one point +PKGFILE?= ${${p}_PKGFILE} +. endfor +_EXTRA_PACKAGE_TARGET_DEP+= ${_PKGDIR} +.for p in ${_PKGS} +${p}_WRKDIR_PKGFILE= ${WRKDIR}/pkg/${p}-${PKGVERSION}${PKG_SUFX} +.endfor + CONFIGURE_SCRIPT?= configure CONFIGURE_CMD?= ./${CONFIGURE_SCRIPT} CONFIGURE_TARGET?= ${HOSTARCH}-portbld-${OPSYS:tl}${OSREL} @@ -3402,10 +3444,6 @@ _EXTRA_PACKAGE_TARGET_DEP+= ${PKGFILE} _PORTS_DIRECTORIES+= ${PKGREPOSITORY} -${PKGFILE}: ${WRKDIR_PKGFILE} ${PKGREPOSITORY} - @${LN} -f ${WRKDIR_PKGFILE} ${PKGFILE} 2>/dev/null \ - || ${CP} -f ${WRKDIR_PKGFILE} ${PKGFILE} - . if ${PKGORIGIN} == "ports-mgmt/pkg" || ${PKGORIGIN} == "ports-mgmt/pkg-devel" _EXTRA_PACKAGE_TARGET_DEP+= ${PKGLATESTREPOSITORY} _PORTS_DIRECTORIES+= ${PKGLATESTREPOSITORY} @@ -3417,16 +3455,29 @@ .endif -# from here this will become a loop for subpackages -${WRKDIR_PKGFILE}: ${TMPPLIST} create-manifest ${WRKDIR}/pkg - @if ! ${SETENV} ${PKG_ENV} FORCE_POST="${_FORCE_POST_PATTERNS}" ${PKG_CREATE} ${PKG_CREATE_ARGS} -m ${METADIR} -p ${TMPPLIST} -f ${PKG_SUFX:S/.//} -o ${WRKDIR}/pkg ${PKGNAME}; then \ +.for p in ${_PKGS} +${_PLIST}.${p}: ${TMPPLIST} + @if [ "${PKGBASE}" = "${.TARGET:T:S/.PLIST.//}" ]; then \ + ${GREP} -Fv -e"@comment " -e"@@" ${TMPPLIST} > ${.TARGET} ; \ + else \ + ${SED} -n "s/@@${.TARGET:T:S/.PLIST.${PKGBASE}-//}@@//p" ${TMPPLIST} > ${.TARGET} ; \ + fi + +${${p}_WRKDIR_PKGFILE}: ${_PLIST}.${p} create-manifest.${p} ${WRKDIR}/pkg + @echo "===> Building ${p}-${PKGVERSION}" + @if ! ${SETENV} ${PKG_ENV} FORCE_POST="${_FORCE_POST_PATTERNS}" ${PKG_CREATE} ${PKG_CREATE_ARGS} -m ${METADIR}.${p} -p ${_PLIST}.${p} -f ${PKG_SUFX:S/.//} -o ${WRKDIR}/pkg ${PKGNAME}; then \ cd ${.CURDIR} && eval ${MAKE} delete-package >/dev/null; \ exit 1; \ fi - # -# Temporary will be later dynamically added per subpackages -_EXTRA_PACKAGE_TARGET_DEP+= ${WRKDIR_PKGFILE} -# This will be the end of the loop + +_EXTRA_PACKAGE_TARGET_DEP+= ${${p}_WRKDIR_PKGFILE} + +${${p}_PKGFILE}: ${${p}_WRKDIR_PKGFILE} + @${LN} -f ${${p}_WRKDIR_PKGFILE} ${${p}_PKGFILE} 2>/dev/null \ + || ${CP} -f ${${p}_WRKDIR_PKGFILE} ${${p}_PKGFILE} + +_EXTRA_PACKAGE_TARGET_DEP+= ${${p}_PKGFILE} +.endfor .if !target(do-package) PKG_CREATE_ARGS= -r ${STAGEDIR} @@ -3438,14 +3489,18 @@ .if !target(delete-package) delete-package: - @${ECHO_MSG} "===> Deleting package for ${PKGNAME}" +. for p in ${_PKGS} + @${ECHO_MSG} "===> Deleting package for ${p}" # When staging, the package may only be in the workdir if not root - @${RM} ${PKGFILE} ${WRKDIR_PKGFILE} 2>/dev/null || : + @${RM} ${${p}_PKGFILE} ${${p}_WRKDIR_PKGFILE} 2>/dev/null || : +. endfor .endif .if !target(delete-package-list) delete-package-list: - @${ECHO_CMD} "[ -f ${PKGFILE} ] && (${ECHO_CMD} deleting ${PKGFILE}; ${RM} ${PKGFILE})" +. for p in ${_PKGS} + @${ECHO_CMD} "[ -f ${${p}_PKGFILE} ] && (${ECHO_CMD} deleting ${${p}_PKGFILE}; ${RM} ${${p}_PKGFILE})" +. endfor .endif # Used by scripts and users to install a package from local repository. @@ -3457,13 +3512,16 @@ .if defined(INSTALLS_DEPENDS) _INSTALL_PKG_ARGS+= -A .endif -install-package: - @if [ -f "${WRKDIR}/pkg/${PKGNAME}${PKG_SUFX}" ]; then \ - _pkgfile="${WRKDIR_PKGFILE}"; \ +.for p in ${_PKGS} +install-package: install-package.${p} +install-package.${p}: + @if [ -f "${${p}_WRKDIR_PKGFILE}" ]; then \ + _pkgfile="${${p}_WRKDIR_PKGFILE}"; \ else \ - _pkgfile="${PKGFILE}"; \ + _pkgfile="${${p}_PKGFILE}"; \ fi; \ ${PKG_ADD} ${_INSTALL_PKG_ARGS} $${_pkgfile} +.endfor .endif @@ -3652,7 +3710,7 @@ test-message: @${ECHO_MSG} "===> Testing for ${PKGNAME}" package-message: - @${ECHO_MSG} "===> Building package for ${PKGNAME}" + @${ECHO_MSG} "===> Building packages for ${PKGNAME}" # Empty pre-* and post-* targets @@ -3723,14 +3781,16 @@ ${SU_CMD} "${MAKE} ${.TARGET}" @${ECHO_MSG} "===> Returning to user credentials" .else - @${ECHO_MSG} "===> Deinstalling for ${PKGBASE}" - @if ${PKG_INFO} -e ${PKGBASE}; then \ - p=`${PKG_INFO} -q -O ${PKGBASE}`; \ +.for _p in ${_PKGS} + @${ECHO_MSG} "===> Deinstalling for ${_p}" + @if ${PKG_INFO} -e ${_p}; then \ + p=`${PKG_INFO} -q -O ${_p}`; \ ${ECHO_MSG} "===> Deinstalling $${p}"; \ - ${PKG_DELETE} -f ${PKGBASE} ; \ + ${PKG_DELETE} -f ${_p} ; \ else \ - ${ECHO_MSG} "===> ${PKGBASE} not installed, skipping"; \ + ${ECHO_MSG} "===> ${_p} not installed, skipping"; \ fi +.endfor @${RM} ${INSTALL_COOKIE} ${PACKAGE_COOKIE} .endif .endif @@ -3978,7 +4038,7 @@ repackage: pre-repackage package pre-repackage: - @${RM} ${PACKAGE_COOKIE} + @${RM} ${PACKAGE_COOKIE} ${TMPPLIST}* .endif # Build a package but don't check the cookie for installation, also don't @@ -4278,34 +4338,36 @@ PKG_NOTES_ENV+= dp_PKG_NOTE_${note}=${PKG_NOTE_${note}:Q} .endfor -create-manifest: +.for p in ${_PKGS} +create-manifest: create-manifest.${p} +create-manifest.${p}: @${SETENV} \ dp_SCRIPTSDIR='${SCRIPTSDIR}' \ dp_ACTUAL_PACKAGE_DEPENDS='${ACTUAL-PACKAGE-DEPENDS}' \ dp_CATEGORIES='${CATEGORIES:u:S/$/,/}' \ - dp_COMMENT=${COMMENT:Q} \ + dp_COMMENT=${COMMENT.${p}:Q} \ dp_COMPLETE_OPTIONS_LIST='${COMPLETE_OPTIONS_LIST}' \ dp_DEPRECATED=${DEPRECATED:Q} \ - dp_DESCR='${DESCR}' \ + dp_DESCR='${DESCR.${p}}' \ dp_EXPIRATION_DATE='${EXPIRATION_DATE}' \ dp_GROUPS='${GROUPS:u:S/$/,/}' \ dp_LICENSE='${LICENSE:u:S/$/,/}' \ dp_LICENSE_COMB='${LICENSE_COMB}' \ dp_MAINTAINER='${MAINTAINER}' \ - dp_METADIR='${METADIR}' \ + dp_METADIR='${METADIR}.${p}' \ dp_NO_ARCH='${NO_ARCH}' \ - dp_PKGBASE='${PKGBASE}' \ - dp_PKGDEINSTALL='${PKGDEINSTALL}' \ - dp_PKGINSTALL='${PKGINSTALL}' \ - dp_PKGMESSAGES='${_PKGMESSAGES}' \ + dp_PKGBASE='${p}' \ + dp_PKGDEINSTALL='${PKGDEINSTALL.${p}}' \ + dp_PKGINSTALL='${PKGINSTALL.${p}}' \ + dp_PKGMESSAGES='${_PKGMESSAGES.${p}}' \ dp_PKGORIGIN='${PKGORIGIN}' \ - dp_PKGPOSTDEINSTALL='${PKGPOSTDEINSTALL}' \ - dp_PKGPOSTINSTALL='${PKGPOSTINSTALL}' \ - dp_PKGPOSTUPGRADE='${PKGPOSTUPGRADE}' \ - dp_PKGPREDEINSTALL='${PKGPREDEINSTALL}' \ - dp_PKGPREINSTALL='${PKGPREINSTALL}' \ - dp_PKGPREUPGRADE='${PKGPREUPGRADE}' \ - dp_PKGUPGRADE='${PKGUPGRADE}' \ + dp_PKGPOSTDEINSTALL='${PKGPOSTDEINSTALL.${p}}' \ + dp_PKGPOSTINSTALL='${PKGPOSTINSTALL.${p}}' \ + dp_PKGPOSTUPGRADE='${PKGPOSTUPGRADE.${p}}' \ + dp_PKGPREDEINSTALL='${PKGPREDEINSTALL.${p}}' \ + dp_PKGPREINSTALL='${PKGPREINSTALL.${p}}' \ + dp_PKGPREUPGRADE='${PKGPREUPGRADE.${p}}' \ + dp_PKGUPGRADE='${PKGUPGRADE.${p}}' \ dp_PKGVERSION='${PKGVERSION}' \ dp_PKG_BIN='${PKG_BIN}' \ dp_PKG_IGNORE_DEPENDS='${PKG_IGNORE_DEPENDS}' \ @@ -4316,6 +4378,7 @@ dp_WWW='${WWW}' \ ${PKG_NOTES_ENV} \ ${SH} ${SCRIPTSDIR}/create-manifest.sh +.endfor # Print out package names. @@ -4703,20 +4766,20 @@ STAGE_ARGS= -i ${STAGEDIR} .if !defined(NO_PKG_REGISTER) -fake-pkg: +. for p in ${_PKGS} +fake-pkg: fake-pkg.${p} +fake-pkg.${p}: .if defined(INSTALLS_DEPENDS) @${ECHO_MSG} "===> Registering installation for ${PKGNAME} as automatic" + @${SETENV} ${PKG_ENV} FORCE_POST="${_FORCE_POST_PATTERNS}" ${PKG_REGISTER} -d ${STAGE_ARGS} -m ${METADIR}.${p} -f ${_PLIST}.${p} .else @${ECHO_MSG} "===> Registering installation for ${PKGNAME}" + @${SETENV} ${PKG_ENV} FORCE_POST="${_FORCE_POST_PATTERNS}" ${PKG_REGISTER} ${STAGE_ARGS} -m ${METADIR}.${p} -f ${_PLIST}.${p} .endif -.if defined(INSTALLS_DEPENDS) - @${SETENV} ${PKG_ENV} FORCE_POST="${_FORCE_POST_PATTERNS}" ${PKG_REGISTER} -d ${STAGE_ARGS} -m ${METADIR} -f ${TMPPLIST} -.else - @${SETENV} ${PKG_ENV} FORCE_POST="${_FORCE_POST_PATTERNS}" ${PKG_REGISTER} ${STAGE_ARGS} -m ${METADIR} -f ${TMPPLIST} -.endif - @${RM} -r ${METADIR} -.endif + @${RM} -r ${METADIR.${p}} +.endfor .endif +.endif # !target(fake-pkg) # Depend is generally meaningless for arbitrary ports, but if someone wants # one they can override this. This is just to catch people who've gotten into Index: lang/perl5-devel/Makefile =================================================================== --- lang/perl5-devel/Makefile +++ lang/perl5-devel/Makefile @@ -27,6 +27,8 @@ #DEPRECATED= Support end three years after .0 release, please upgrade to a more recent version of Perl #EXPIRATION_DATE= +SUBPACKAGES= gdbm + TEST_TARGET= test_harness TEST_ENV= ${MAKE_ENV} TEST_JOBS=${MAKE_JOBS_NUMBER} \ LD_LIBRARY_PATH=${WRKSRC} @@ -37,7 +39,7 @@ GH_PROJECT= perl5 GH_TAGNAME= v5.29.1-29-g3d50648cc4 -OPTIONS_DEFINE= DEBUG GDBM PERL_64BITINT MULTIPLICITY SITECUSTOMIZE \ +OPTIONS_DEFINE= DEBUG PERL_64BITINT MULTIPLICITY SITECUSTOMIZE \ THREADS PERL_MALLOC DTRACE DOT_INC OPTIONS_DEFAULT= PERL_64BITINT THREADS MULTIPLICITY DTRACE @@ -51,7 +53,6 @@ .endfor EXCLUSIVE_DESC= Exclusive OPTIONS -GDBM_DESC= GDBM_File extension PERL_MALLOC_DESC= Use Perl malloc PERL_64BITINT_DESC= Use 64 bit integers (on i386) THREADS_DESC= Build threaded perl @@ -64,9 +65,6 @@ DEBUG_CONFIGURE_OFF= -Doptimize="${CFLAGS}" DTRACE_CONFIGURE_ON= -Dusedtrace DTRACE_CONFIGURE_OFF= -Uusedtrace -GDBM_CONFIGURE_ON= -Di_gdbm -GDBM_CONFIGURE_OFF= -Ui_gdbm -GDBM_LIB_DEPENDS= libgdbm.so:databases/gdbm PERL_64BITINT_CONFIGURE_ON= -Duse64bitint MULTIPLICITY_CONFIGURE_ON= -Dusemultiplicity=y MULTIPLICITY_CONFIGURE_OFF= -Dusemultiplicity=n @@ -126,6 +124,9 @@ -Alddlflags='-L${WRKSRC} -L${PREFIX}/${_ARCH_LIB}/CORE -lperl' \ -Dshrpldflags='$$(LDDLFLAGS:N-L${WRKSRC}:N-L${PREFIX}/${_ARCH_LIB}/CORE:N-lperl) -Wl,-soname,$$(LIBPERL)' +CONFIGURE_ARGS+= -Di_gdbm +LIB_DEPENDS+= libgdbm.so:databases/gdbm + # Give a hint of where libperl.so can be found. USE_LDCONFIG= ${PREFIX}/${_ARCH_LIB}/CORE Index: lang/perl5-devel/pkg-descr.gdbm =================================================================== --- /dev/null +++ lang/perl5-devel/pkg-descr.gdbm @@ -0,0 +1,6 @@ +GDBM_File is a perl module which allows Perl programs to make use of the +facilities provided by the GNU gdbm library. If you intend to use this +module you should really have a copy of the gdbm manualpage at hand. + +Most of the libgdbm.a functions are available through the GDBM_File +interface. Index: lang/perl5-devel/pkg-plist =================================================================== --- lang/perl5-devel/pkg-plist +++ lang/perl5-devel/pkg-plist @@ -833,7 +833,7 @@ %%ARCH_LIB%%/File/Spec/VMS.pm %%ARCH_LIB%%/File/Spec/Win32.pm %%ARCH_LIB%%/Filter/Util/Call.pm -%%GDBM%%%%ARCH_LIB%%/GDBM_File.pm +@@gdbm@@%%ARCH_LIB%%/GDBM_File.pm %%ARCH_LIB%%/Hash/Util.pm %%ARCH_LIB%%/Hash/Util/FieldHash.pm %%ARCH_LIB%%/I18N/Langinfo.pm @@ -905,7 +905,7 @@ %%ARCH_LIB%%/auto/File/DosGlob/DosGlob.so %%ARCH_LIB%%/auto/File/Glob/Glob.so %%ARCH_LIB%%/auto/Filter/Util/Call/Call.so -%%GDBM%%%%ARCH_LIB%%/auto/GDBM_File/GDBM_File.so +@@gdbm@@%%ARCH_LIB%%/auto/GDBM_File/GDBM_File.so %%ARCH_LIB%%/auto/Hash/Util/FieldHash/FieldHash.so %%ARCH_LIB%%/auto/Hash/Util/Util.so %%ARCH_LIB%%/auto/I18N/Langinfo/Langinfo.so @@ -1366,7 +1366,7 @@ %%MAN3%%/Filter::Simple.3.gz %%MAN3%%/Filter::Util::Call.3.gz %%MAN3%%/FindBin.3.gz -%%GDBM%%%%MAN3%%/GDBM_File.3.gz +@@gdbm@@%%MAN3%%/GDBM_File.3.gz %%MAN3%%/Getopt::Long.3.gz %%MAN3%%/Getopt::Std.3.gz %%MAN3%%/HTTP::Tiny.3.gz