This is the mail archive of the cygwin-apps mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH cygport 3/2] Generate a separate .hint for the source package


Pass through HOMEPAGE as homepage: in that hint, if present.
requires: in a source package hint makes no sense.

---
 lib/pkg_pkg.cygpart                           | 21 ++++++++++++-------
 .../dist/multiple/multiple-3.14-1-src.hint    |  6 ++++++
 testsuite/hints/multiple/multiple.cygport     |  1 +
 .../dist/single/single-2.3.4-1-src.hint       |  5 +++++
 4 files changed, 25 insertions(+), 8 deletions(-)
 create mode 100644 testsuite/hints/multiple/hints/multiple-3.14-1.x86_64/dist/multiple/multiple-3.14-1-src.hint
 create mode 100644 testsuite/hints/single/hints/single-2.3.4-1.x86_64/dist/single/single-2.3.4-1-src.hint

diff --git a/lib/pkg_pkg.cygpart b/lib/pkg_pkg.cygpart
index 753de9e..211524d 100644
--- a/lib/pkg_pkg.cygpart
+++ b/lib/pkg_pkg.cygpart
@@ -878,32 +878,37 @@ _EOF
 		done
 	fi
 
-	# e.g. split library package w/o PN in PKG_NAMES
-	if [ ! -f ${distdir}/${PN}/${PN}-${PVR}.hint ]
+	# source package hint
+	if [ ! -f ${distdir}/${PN}/${PN}-${PVR}-src.hint ]
 	then
 		pkg_category_var=${PN//[-+\.]/_}_CATEGORY;
 		pkg_summary_var=${PN//[-+\.]/_}_SUMMARY;
 		pkg_description_var=${PN//[-+\.]/_}_DESCRIPTION;
 
-		if [ -f ${C}/${PN}.hint ]
+		if [ -f ${C}/${PN}-src.hint ]
 		then
-			cp ${C}/${PN}.hint ${distdir}/${PN}/${PN}-${PVR}.hint
+			cp ${C}/${PN}-src.hint ${distdir}/${PN}/${PN}-${PVR}-src.hint
 		elif [ -f ${C}/setup.hint ]
 		then
-			cp ${C}/setup.hint ${distdir}/${PN}/${PN}-${PVR}.hint
+			cp ${C}/setup.hint ${distdir}/${PN}/${PN}-${PVR}-src.hint
 		elif [ -n "${!pkg_category_var:-${CATEGORY}}" \
 			-a -n "${!pkg_summary_var:-${SUMMARY}}${!pkg_description_var:-${DESCRIPTION}}" ]
 		then
-			cat > ${distdir}/${PN}/${PN}-${PVR}.hint <<-_EOF
+			cat > ${distdir}/${PN}/${PN}-${PVR}-src.hint <<-_EOF
 category: ${!pkg_category_var:-${CATEGORY}}
-requires:
 sdesc: "${!pkg_summary_var:-${SUMMARY}}"
 ldesc: "${!pkg_description_var:-${DESCRIPTION:-${!pkg_summary_var:-${SUMMARY}}}}"
 skip:
 ${pkg_tag}
 _EOF
+			if [ -n "${HOMEPAGE}" ]
+			then
+				cat >> ${distdir}/${PN}/${PN}-${PVR}-src.hint <<-_EOF
+homepage: ${HOMEPAGE}
+_EOF
+			fi
 		else
-			warning "${PN}.hint is missing";
+			warning "${PN}-src.hint is missing";
 		fi
 	fi
 }
diff --git a/testsuite/hints/multiple/hints/multiple-3.14-1.x86_64/dist/multiple/multiple-3.14-1-src.hint b/testsuite/hints/multiple/hints/multiple-3.14-1.x86_64/dist/multiple/multiple-3.14-1-src.hint
new file mode 100644
index 0000000..51e527e
--- /dev/null
+++ b/testsuite/hints/multiple/hints/multiple-3.14-1.x86_64/dist/multiple/multiple-3.14-1-src.hint
@@ -0,0 +1,6 @@
+category: Base
+sdesc: "Summary of hints for multiple package test (source)"
+ldesc: "Description of hints for multiple package test (source)"
+skip:
+
+homepage: http://test.invalid
diff --git a/testsuite/hints/multiple/multiple.cygport b/testsuite/hints/multiple/multiple.cygport
index ab6ade9..f56502c 100644
--- a/testsuite/hints/multiple/multiple.cygport
+++ b/testsuite/hints/multiple/multiple.cygport
@@ -3,6 +3,7 @@ VERSION=3.14
 RELEASE=1
 SUMMARY="Summary of hints for multiple package test"
 DESCRIPTION="Description of hints for multiple package test"
+HOMEPAGE="http://test.invalid";
 
 PKG_NAMES="libmultiple1 libmultiple-devel"
 
diff --git a/testsuite/hints/single/hints/single-2.3.4-1.x86_64/dist/single/single-2.3.4-1-src.hint b/testsuite/hints/single/hints/single-2.3.4-1.x86_64/dist/single/single-2.3.4-1-src.hint
new file mode 100644
index 0000000..2bb4adc
--- /dev/null
+++ b/testsuite/hints/single/hints/single-2.3.4-1.x86_64/dist/single/single-2.3.4-1-src.hint
@@ -0,0 +1,5 @@
+category: Base
+sdesc: "Summary of hints for single package test"
+ldesc: "Description of hints for single package test"
+skip:
+
-- 
2.21.0


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]