diff options
author | nros <nros@pkgsrc.org> | 2022-10-05 09:36:52 +0000 |
---|---|---|
committer | nros <nros@pkgsrc.org> | 2022-10-05 09:36:52 +0000 |
commit | f03cf9cb796601d9c6cb0b1bbf3da6ce8424024b (patch) | |
tree | 68a3a3c7c37f6d273b5d51811053e161628a67f0 | |
parent | b7fc0c1799367aef487734f78f26274bee88ea9d (diff) | |
download | pkgsrc-f03cf9cb796601d9c6cb0b1bbf3da6ce8424024b.tar.gz |
dar: move option stuff to options.mk, remove PKGREVISION comment
-rw-r--r-- | archivers/dar/Makefile | 54 | ||||
-rw-r--r-- | archivers/dar/options.mk | 50 |
2 files changed, 53 insertions, 51 deletions
diff --git a/archivers/dar/Makefile b/archivers/dar/Makefile index 4a771620f38..85202f4e5d6 100644 --- a/archivers/dar/Makefile +++ b/archivers/dar/Makefile @@ -1,7 +1,6 @@ -# $NetBSD: Makefile,v 1.60 2022/10/03 13:59:05 nros Exp $ +# $NetBSD: Makefile,v 1.61 2022/10/05 09:36:52 nros Exp $ DISTNAME= dar-2.7.7 -#PKGREVISION= 3 CATEGORIES= archivers sysutils MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=dar/} @@ -32,60 +31,11 @@ CHECK_INTERPRETER_SKIP+= share/dar/samples/* REPLACE_PERL+= doc/samples/dar_backup REPLACE_BASH+= doc/samples/*.bash doc/samples/*.sh doc/samples/*.duc -## Our threading check here is the same as the one used in devel/perl5. -# -CHECK_BUILTIN.pthread:=yes -.include "../../mk/pthread.builtin.mk" -CHECK_BUILTIN.pthread:=no - -## XXX I'm following the USE_FEATURES semantics used in security/openssl. -# -.if !empty(USE_BUILTIN.pthread:tl:Myes) -USE_FEATURES.dar= threads -.else -USE_FEATURES.dar= # empty -.endif - -PKG_OPTIONS_VAR= PKG_OPTIONS.dar -PKG_OPTIONS_OPTIONAL_GROUPS= int -PKG_OPTIONS_GROUP.int= dar-int32 dar-int64 -PKG_SUGGESTED_OPTIONS= dar-int64 ${USE_FEATURES.dar} -PKG_SUPPORTED_OPTIONS= threads - -.include "../../mk/bsd.options.mk" - -## Dar is built by default with an arbitrary-size-integer library for -## managing all file length/timestamp details. If 32-bit or 64-bit -## integers (with overflow protection) are sufficient for requirements, -## the following options can significantly reduce the run-time memory -## and CPU overheads of Dar. -# -DARBITS= ${PKG_OPTIONS:C/[^[:digit:]]*//:M[36][24]} -PLIST_SUBST+= DARBITS=${DARBITS} - -.if !empty(DARBITS) -CONFIGURE_ARGS+= --enable-mode=${DARBITS:Q} -.endif - EGDIR= ${PREFIX}/share/examples/dar INSTALL_MAKE_FLAGS+= sysconfdir=${EGDIR} CONF_FILES= ${EGDIR}/darrc ${PKG_SYSCONFDIR}/darrc -## We want the threading library to be specified by pkgsrc, and only -## when desired, viz. in the case below. Using PTHREAD_AUTO_VARS -## with the accompanying BUILDLINK_TRANSFORM directive is easier -## then patching configure. -# -.if !empty(PKG_OPTIONS:Mthreads) -USE_FEATURES.openssl+= threads -PTHREAD_AUTO_VARS= yes -BUILDLINK_TRANSFORM+= rm:-lpthread -.include "../../devel/libthreadar/buildlink3.mk" -.else -CONFIGURE_ARGS+= --disable-thread-safe -.endif - UNLIMIT_RESOURCES= datasize ## XXX Needed for getopt() with SunPro (USE_FEATURES?) @@ -108,6 +58,8 @@ SUBST_SED.static= -e 's,-all-static,-static,g' BUILDLINK_TRANSFORM+= l:execinfo:execinfo:elf .endif +.include "options.mk" + .include "../../archivers/bzip2/buildlink3.mk" .include "../../archivers/lzo/buildlink3.mk" .include "../../archivers/lz4/buildlink3.mk" diff --git a/archivers/dar/options.mk b/archivers/dar/options.mk new file mode 100644 index 00000000000..316a84a63f7 --- /dev/null +++ b/archivers/dar/options.mk @@ -0,0 +1,50 @@ +# $NetBSD: options.mk,v 1.1 2022/10/05 09:36:52 nros Exp $ + +## Our threading check here is the same as the one used in devel/perl5. +# +CHECK_BUILTIN.pthread:=yes +.include "../../mk/pthread.builtin.mk" +CHECK_BUILTIN.pthread:=no + +## XXX I'm following the USE_FEATURES semantics used in security/openssl. +# +.if !empty(USE_BUILTIN.pthread:tl:Myes) +USE_FEATURES.dar= threads +.else +USE_FEATURES.dar= # empty +.endif + +PKG_OPTIONS_VAR= PKG_OPTIONS.dar +PKG_OPTIONS_OPTIONAL_GROUPS= int +PKG_OPTIONS_GROUP.int= dar-int32 dar-int64 +PKG_SUGGESTED_OPTIONS= dar-int64 ${USE_FEATURES.dar} +PKG_SUPPORTED_OPTIONS= threads + +.include "../../mk/bsd.options.mk" + +## Dar is built by default with an arbitrary-size-integer library for +## managing all file length/timestamp details. If 32-bit or 64-bit +## integers (with overflow protection) are sufficient for requirements, +## the following options can significantly reduce the run-time memory +## and CPU overheads of Dar. +# +DARBITS= ${PKG_OPTIONS:C/[^[:digit:]]*//:M[36][24]} +PLIST_SUBST+= DARBITS=${DARBITS} + +.if !empty(DARBITS) +CONFIGURE_ARGS+= --enable-mode=${DARBITS:Q} +.endif + +## We want the threading library to be specified by pkgsrc, and only +## when desired, viz. in the case below. Using PTHREAD_AUTO_VARS +## with the accompanying BUILDLINK_TRANSFORM directive is easier +## then patching configure. +# +.if !empty(PKG_OPTIONS:Mthreads) +USE_FEATURES.openssl+= threads +PTHREAD_AUTO_VARS= yes +BUILDLINK_TRANSFORM+= rm:-lpthread +.include "../../devel/libthreadar/buildlink3.mk" +.else +CONFIGURE_ARGS+= --disable-thread-safe +.endif |