Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F140875283
D40550.id123368.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
5 KB
Referenced Files
None
Subscribers
None
D40550.id123368.diff
View Options
Index: Mk/Scripts/functions.sh
===================================================================
--- Mk/Scripts/functions.sh
+++ Mk/Scripts/functions.sh
@@ -7,7 +7,8 @@
_strip_perms() {
sed -Ee 's/^@\([^)]*\)[[:space:]]+//' \
-e 's/^(@[[:alpha:]]+)\([^)]*\)[[:space:]]+/\1 /' \
- -e 's/^@@[[:alnum:]]+@@//'
+ -e 's/^@@[[:alnum:]]+@@//' \
+ -e 's/@@[[:alnum:]]+@@$//'
}
# Expand TMPPLIST to absolute paths, splitting files and dirs into separate
Index: Mk/bsd.port.mk
===================================================================
--- Mk/bsd.port.mk
+++ Mk/bsd.port.mk
@@ -4591,15 +4591,21 @@
. if !empty(_REALLY_ALL_POSSIBLE_OPTIONS:M${_type})
. if !target(add-plist-${_type:tl})
. if defined(PORT${_type}) && !empty(PORT_OPTIONS:M${_type})
+. if defined(${_type}_SUBPACKAGES)
+SP_${_type}= @@${${_type}_SUBPACKAGES}@@
+. else
+SP_${_type}=
+. endif
add-plist-${_type:tl}:
. for x in ${PORT${_type}}
@if ${ECHO_CMD} "${x}"| ${AWK} '$$1 ~ /(\*|\||\[|\]|\?|\{|\}|\$$)/ { exit 1};'; then \
if [ ! -e ${STAGEDIR}${${_type}DIR}/${x} ]; then \
- ${ECHO_CMD} ${${_type}DIR}/${x} >> ${TMPPLIST}; \
- fi;fi
+ ${ECHO_CMD} ${SP_${_type}}${${_type}DIR}/${x} >> ${TMPPLIST}; \
+ fi \
+ fi
. endfor
@${FIND} -P ${PORT${_type}:S/^/${STAGEDIR}${${_type}DIR}\//} ! -type d 2>/dev/null | \
- ${SED} -ne 's,^${STAGEDIR},,p' >> ${TMPPLIST}
+ ${SED} -ne 's,^${STAGEDIR},${SP_${_type}},p' >> ${TMPPLIST}
. endif
. endif
. endif
Index: ports-mgmt/Makefile
===================================================================
--- ports-mgmt/Makefile
+++ ports-mgmt/Makefile
@@ -77,6 +77,7 @@
SUBDIR += reprise
SUBDIR += sccache-overlay
SUBDIR += submodules2tuple
+ SUBDIR += subpkgtest
SUBDIR += synth
SUBDIR += wanted-ports
Index: ports-mgmt/subpkgtest/Makefile
===================================================================
--- /dev/null
+++ ports-mgmt/subpkgtest/Makefile
@@ -0,0 +1,49 @@
+PORTNAME= port-test
+PORTVERSION= 0.0.2
+DISTVERSIONPREFIX= v
+CATEGORIES= ports-mgmt
+
+MAINTAINER= pizzamig@FreeBSD.org
+COMMENT= Small C project to be used as test
+WWW= https://github.com/pizzamig/port-test
+
+LICENSE= BSD3CLAUSE
+LICENSE_FILE= ${WRKSRC}/LICENSE
+
+USE_GITHUB= yes
+GH_ACCOUNT= pizzamig
+
+OPTIONS_DEFINE= DATA DOCS EXAMPLES
+OPTIONS_SUB= yes
+OPTIONS_DEFAULT= DATA
+
+DATA_DESC= Install additional data files
+
+SUBPACKAGES= cmd2
+SELF_DEPENDS.cmd2= main
+
+DATA_SUBPACKAGES= data1 data2
+DOCS_SUBPACKAGES= docs
+EXAMPLES_SUBPACKAGES= examples
+
+PORTDOCS= README.md
+PORTEXAMPLES= EXAMPLES.md
+
+do-install:
+ ${INSTALL_PROGRAM} ${WRKSRC}/cmd1 ${STAGEDIR}${PREFIX}/bin
+ ${INSTALL_PROGRAM} ${WRKSRC}/cmd2 ${STAGEDIR}${PREFIX}/bin
+
+post-install-DATA-on:
+ ${MKDIR} ${STAGEDIR}${DATADIR}
+ ${INSTALL_DATA} ${WRKSRC}/data1.txt ${STAGEDIR}${DATADIR}
+ ${INSTALL_DATA} ${WRKSRC}/data2.txt ${STAGEDIR}${DATADIR}
+
+post-install-DOCS-on:
+ ${MKDIR} ${STAGEDIR}${DOCSDIR}
+ ${INSTALL_DATA} ${WRKSRC}/README.md ${STAGEDIR}${DOCSDIR}
+
+post-install-EXAMPLES-on:
+ ${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
+ ${INSTALL_DATA} ${WRKSRC}/EXAMPLES.md ${STAGEDIR}${EXAMPLESDIR}
+
+.include <bsd.port.mk>
Index: ports-mgmt/subpkgtest/distinfo
===================================================================
--- /dev/null
+++ ports-mgmt/subpkgtest/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1686490183
+SHA256 (pizzamig-port-test-v0.0.2_GH0.tar.gz) = 3845e74e7963712d22bd8219b91914fc217e59bf63e180ccfc7f2aaaf1f2c569
+SIZE (pizzamig-port-test-v0.0.2_GH0.tar.gz) = 2203
Index: ports-mgmt/subpkgtest/pkg-descr
===================================================================
--- /dev/null
+++ ports-mgmt/subpkgtest/pkg-descr
@@ -0,0 +1,2 @@
+port-test is just a test.
+The code is only a bunch of hello worlds written in C
Index: ports-mgmt/subpkgtest/pkg-descr.cmd2
===================================================================
--- /dev/null
+++ ports-mgmt/subpkgtest/pkg-descr.cmd2
@@ -0,0 +1,2 @@
+port-test-cmd2 only contains cmd2
+The code is only a hello world written in C echoing 'cmd2'
Index: ports-mgmt/subpkgtest/pkg-descr.data1
===================================================================
--- /dev/null
+++ ports-mgmt/subpkgtest/pkg-descr.data1
@@ -0,0 +1 @@
+port-test-data1 only contains data1.txt file
Index: ports-mgmt/subpkgtest/pkg-descr.data2
===================================================================
--- /dev/null
+++ ports-mgmt/subpkgtest/pkg-descr.data2
@@ -0,0 +1 @@
+port-test-data2 only contains data2.txt file
Index: ports-mgmt/subpkgtest/pkg-descr.docs
===================================================================
--- /dev/null
+++ ports-mgmt/subpkgtest/pkg-descr.docs
@@ -0,0 +1 @@
+port-test-docs only contains documentation
Index: ports-mgmt/subpkgtest/pkg-descr.examples
===================================================================
--- /dev/null
+++ ports-mgmt/subpkgtest/pkg-descr.examples
@@ -0,0 +1 @@
+port-test-examples only contains examples
Index: ports-mgmt/subpkgtest/pkg-plist
===================================================================
--- /dev/null
+++ ports-mgmt/subpkgtest/pkg-plist
@@ -0,0 +1,4 @@
+bin/cmd1
+@@cmd2@@bin/cmd2
+@@data1@@%%DATA%%%%DATADIR%%/data1.txt
+@@data2@@%%DATA%%%%DATADIR%%/data2.txt
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Dec 30, 3:30 AM (1 h, 19 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
27374869
Default Alt Text
D40550.id123368.diff (5 KB)
Attached To
Mode
D40550: Testing package for subpkgs
Attached
Detach File
Event Timeline
Log In to Comment