public inbox for cygwin-apps@cygwin.com
 help / color / mirror / Atom feed
* [PATCH cygport 1/2] Rename DEPEND to BUILD_DEPENDS
  2017-10-03 19:53 [PATCH cygport 0/2] Better handling of build depends Jon Turney
  2017-10-03 19:53 ` [PATCH cygport 2/2] Pass BUILD_DEPENDS through to .hint for source package as build-depends: Jon Turney
@ 2017-10-03 19:53 ` Jon Turney
  2017-10-03 20:17   ` Andrew Schulman
  2017-11-13 12:57   ` Jon Turney
  2018-02-13  6:31 ` [PATCH cygport 0/2] Better handling of build depends Yaakov Selkowitz
  2020-03-24  3:06 ` [PATCH cygport 0/2] Better handling of build depends Yaakov Selkowitz
  3 siblings, 2 replies; 11+ messages in thread
From: Jon Turney @ 2017-10-03 19:53 UTC (permalink / raw)
  To: cygwin-apps; +Cc: Jon Turney

Somewhat clearer as to it's purposes, and pluralized for consistency with
REQUIRES.

Still support the previous name for backwards compatibility
---
 lib/check_funcs.cygpart | 17 ++++++++++++-----
 1 file changed, 12 insertions(+), 5 deletions(-)

diff --git a/lib/check_funcs.cygpart b/lib/check_funcs.cygpart
index 93f3e12..08b1be3 100644
--- a/lib/check_funcs.cygpart
+++ b/lib/check_funcs.cygpart
@@ -543,9 +543,9 @@ check_vala_module() {
 	return ${ret};
 }
 
-#****f* Information/DEPEND
+#****f* Information/BUILD_DEPENDS
 #  SYNOPSIS
-#  DEPEND="ATOM [ATOM] ..."
+#  BUILD_DEPENDS="ATOM [ATOM] ..."
 #  DESCRIPTION
 #  A list of build-time (not runtime) dependencies to be checked before calling
 #  src_compile.  Each ATOM can be in one of the following forms:
@@ -565,6 +565,8 @@ check_vala_module() {
 #  * tex(foo.ext): TeX modules
 #  * vala(foo-1.0): Vala bindings
 #  * foo: A Cygwin package (check skipped on non-Cygwin build systems)
+#
+# DEPEND is an obsolete synonym for BUILD_DEPENDS.
 #****
 __check_depends() {
 	local atom failed_atoms;
@@ -574,14 +576,19 @@ __check_depends() {
 	        error "Compiling this package requires $(cross_compiling && echo -n ${CHOST}' ')binutils and gcc"
 	fi
 
-	if ! defined DEPEND
+	if ! defined BUILD_DEPENDS
 	then
-		return 0;
+		if defined DEPEND
+		then
+			BUILD_DEPENDS=${DEPEND}
+		else
+			return 0;
+		fi
 	fi
 
 	__deparenthesize() { echo "$@" | sed -e 's|[a-z]*(\([^)]*\))|\1|' ; }
 
-	for atom in ${DEPEND}
+	for atom in ${BUILD_DEPENDS}
 	do
 		case ${atom} in
 		girepository\(*)
-- 
2.14.2

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [PATCH cygport 2/2] Pass BUILD_DEPENDS through to .hint for source package as build-depends:
  2017-10-03 19:53 [PATCH cygport 0/2] Better handling of build depends Jon Turney
@ 2017-10-03 19:53 ` Jon Turney
  2017-10-03 19:53 ` [PATCH cygport 1/2] Rename DEPEND to BUILD_DEPENDS Jon Turney
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 11+ messages in thread
From: Jon Turney @ 2017-10-03 19:53 UTC (permalink / raw)
  To: cygwin-apps; +Cc: Jon Turney

Converting a dependency atom to a package name with full generality requires
a database of all the pathnames contained in all packages, so we don't even
try to do that here.

In the fullness of time, calm may have the information needed to perform
that task, at which time it can start emitting build-depends: lines for
source packages into setup.ini.
---
 lib/pkg_pkg.cygpart | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/lib/pkg_pkg.cygpart b/lib/pkg_pkg.cygpart
index cfc0770..b3aeb32 100644
--- a/lib/pkg_pkg.cygpart
+++ b/lib/pkg_pkg.cygpart
@@ -717,6 +717,10 @@ _EOF
 			then
 				cat >> ${distdir}/${PN}/${distsubdir}/${pkg_name[${n}]}-${PVR}.hint <<-_EOF
 external-source: ${PN}
+_EOF
+			else
+				cat >> ${distdir}/${PN}/${distsubdir}/${pkg_name[${n}]}-${PVR}.hint <<-_EOF
+build-depends: ${BUILD_DEPENDS}
 _EOF
 			fi
 			if defined ${pkg_message_var}
@@ -818,6 +822,7 @@ _EOF
 			cat > ${distdir}/${PN}/${PN}-${PVR}.hint <<-_EOF
 category: ${!pkg_category_var:-${CATEGORY}}
 requires:
+build-depends: ${BUILD_DEPENDS}
 sdesc: "${!pkg_summary_var:-${SUMMARY}}"
 ldesc: "${!pkg_description_var:-${DESCRIPTION:-${!pkg_summary_var:-${SUMMARY}}}}"
 skip:
-- 
2.14.2

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [PATCH cygport 0/2] Better handling of build depends
@ 2017-10-03 19:53 Jon Turney
  2017-10-03 19:53 ` [PATCH cygport 2/2] Pass BUILD_DEPENDS through to .hint for source package as build-depends: Jon Turney
                   ` (3 more replies)
  0 siblings, 4 replies; 11+ messages in thread
From: Jon Turney @ 2017-10-03 19:53 UTC (permalink / raw)
  To: cygwin-apps; +Cc: Jon Turney

Jon Turney (2):
  Rename DEPEND to BUILD_DEPENDS
  Pass BUILD_DEPENDS through to .hint for source package as
    build-depends:

 lib/check_funcs.cygpart | 17 ++++++++++++-----
 lib/pkg_pkg.cygpart     |  5 +++++
 2 files changed, 17 insertions(+), 5 deletions(-)

-- 
2.14.2

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH cygport 1/2] Rename DEPEND to BUILD_DEPENDS
  2017-10-03 19:53 ` [PATCH cygport 1/2] Rename DEPEND to BUILD_DEPENDS Jon Turney
@ 2017-10-03 20:17   ` Andrew Schulman
  2017-11-13 12:57   ` Jon Turney
  1 sibling, 0 replies; 11+ messages in thread
From: Andrew Schulman @ 2017-10-03 20:17 UTC (permalink / raw)
  To: cygwin-apps

> Somewhat clearer as to it's purposes, and pluralized for consistency with
> REQUIRES.

Yes! Thank you!

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [PATCH cygport 1/2] Rename DEPEND to BUILD_DEPENDS
  2017-10-03 19:53 ` [PATCH cygport 1/2] Rename DEPEND to BUILD_DEPENDS Jon Turney
  2017-10-03 20:17   ` Andrew Schulman
@ 2017-11-13 12:57   ` Jon Turney
  1 sibling, 0 replies; 11+ messages in thread
From: Jon Turney @ 2017-11-13 12:57 UTC (permalink / raw)
  To: cygwin-apps; +Cc: Jon Turney

Somewhat clearer as to it's purposes, and pluralized for consistency with
REQUIRES.

Still support the previous name for backwards compatibility

v2:
Do backwards compatibility correctly so it works when not doing 'all'

Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
---
 bin/cygport.in          |  7 +++++++
 lib/check_funcs.cygpart | 10 ++++++----
 2 files changed, 13 insertions(+), 4 deletions(-)

diff --git a/bin/cygport.in b/bin/cygport.in
index 31b909d..600d982 100644
--- a/bin/cygport.in
+++ b/bin/cygport.in
@@ -426,6 +426,13 @@ then
 	fi
 fi
 
+if ! defined BUILD_DEPENDS
+then
+	if defined DEPEND
+	then
+		BUILD_DEPENDS=${DEPEND}
+	fi
+fi
 
 for restrict in ${RESTRICT//,/ }
 do
diff --git a/lib/check_funcs.cygpart b/lib/check_funcs.cygpart
index 93f3e12..eea19e9 100644
--- a/lib/check_funcs.cygpart
+++ b/lib/check_funcs.cygpart
@@ -543,9 +543,9 @@ check_vala_module() {
 	return ${ret};
 }
 
-#****f* Information/DEPEND
+#****f* Information/BUILD_DEPENDS
 #  SYNOPSIS
-#  DEPEND="ATOM [ATOM] ..."
+#  BUILD_DEPENDS="ATOM [ATOM] ..."
 #  DESCRIPTION
 #  A list of build-time (not runtime) dependencies to be checked before calling
 #  src_compile.  Each ATOM can be in one of the following forms:
@@ -565,6 +565,8 @@ check_vala_module() {
 #  * tex(foo.ext): TeX modules
 #  * vala(foo-1.0): Vala bindings
 #  * foo: A Cygwin package (check skipped on non-Cygwin build systems)
+#
+# DEPEND is an obsolete synonym for BUILD_DEPENDS.
 #****
 __check_depends() {
 	local atom failed_atoms;
@@ -574,14 +576,14 @@ __check_depends() {
 	        error "Compiling this package requires $(cross_compiling && echo -n ${CHOST}' ')binutils and gcc"
 	fi
 
-	if ! defined DEPEND
+	if ! defined BUILD_DEPENDS
 	then
 		return 0;
 	fi
 
 	__deparenthesize() { echo "$@" | sed -e 's|[a-z]*(\([^)]*\))|\1|' ; }
 
-	for atom in ${DEPEND}
+	for atom in ${BUILD_DEPENDS}
 	do
 		case ${atom} in
 		girepository\(*)
-- 
2.15.0

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH cygport 0/2] Better handling of build depends
  2017-10-03 19:53 [PATCH cygport 0/2] Better handling of build depends Jon Turney
  2017-10-03 19:53 ` [PATCH cygport 2/2] Pass BUILD_DEPENDS through to .hint for source package as build-depends: Jon Turney
  2017-10-03 19:53 ` [PATCH cygport 1/2] Rename DEPEND to BUILD_DEPENDS Jon Turney
@ 2018-02-13  6:31 ` Yaakov Selkowitz
  2018-02-13 12:34   ` Jon Turney
  2020-03-24  3:06 ` [PATCH cygport 0/2] Better handling of build depends Yaakov Selkowitz
  3 siblings, 1 reply; 11+ messages in thread
From: Yaakov Selkowitz @ 2018-02-13  6:31 UTC (permalink / raw)
  To: cygwin-apps


[-- Attachment #1.1: Type: text/plain, Size: 255 bytes --]

On 2017-10-03 14:53, Jon Turney wrote:
> Jon Turney (2):
>   Rename DEPEND to BUILD_DEPENDS
>   Pass BUILD_DEPENDS through to .hint for source package as
>     build-depends:

Why can't this be BUILD_REQUIRES and build-requires: ?

-- 
Yaakov


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH cygport 0/2] Better handling of build depends
  2018-02-13  6:31 ` [PATCH cygport 0/2] Better handling of build depends Yaakov Selkowitz
@ 2018-02-13 12:34   ` Jon Turney
  2018-02-13 13:03     ` [PATCH cygport 0/2] Better handling of build requires (v2) Jon Turney
  0 siblings, 1 reply; 11+ messages in thread
From: Jon Turney @ 2018-02-13 12:34 UTC (permalink / raw)
  To: cygwin-apps

On 13/02/2018 06:31, Yaakov Selkowitz wrote:
> On 2017-10-03 14:53, Jon Turney wrote:
>> Jon Turney (2):
>>    Rename DEPEND to BUILD_DEPENDS
>>    Pass BUILD_DEPENDS through to .hint for source package as
>>      build-depends:
> 
> Why can't this be BUILD_REQUIRES and build-requires: ?

No reason at all.  I didn't think very much about the name, just added 
'build' as a prefix.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [PATCH cygport 1/2] Rename DEPEND to BUILD_REQUIRES
  2018-02-13 13:03     ` [PATCH cygport 0/2] Better handling of build requires (v2) Jon Turney
  2018-02-13 13:03       ` [PATCH cygport 2/2] Pass BUILD_REQUIRES through to .hint for source package as build-requires: Jon Turney
@ 2018-02-13 13:03       ` Jon Turney
  1 sibling, 0 replies; 11+ messages in thread
From: Jon Turney @ 2018-02-13 13:03 UTC (permalink / raw)
  To: cygwin-apps; +Cc: Jon Turney

Somewhat clearer as to it's purposes, and pluralized for consistency with
REQUIRES.

Still support the previous name for backwards compatibility

v2:
Do backwards compatibility correctly so it works when not doing 'all'
---
 bin/cygport.in          |  7 +++++++
 lib/check_funcs.cygpart | 10 ++++++----
 2 files changed, 13 insertions(+), 4 deletions(-)

diff --git a/bin/cygport.in b/bin/cygport.in
index c3370e1..e1c7ff4 100755
--- a/bin/cygport.in
+++ b/bin/cygport.in
@@ -428,6 +428,13 @@ then
 	fi
 fi
 
+if ! defined BUILD_REQUIRES
+then
+	if defined DEPEND
+	then
+		BUILD_REQUIRES=${DEPEND}
+	fi
+fi
 
 for restrict in ${RESTRICT//,/ }
 do
diff --git a/lib/check_funcs.cygpart b/lib/check_funcs.cygpart
index 961f263..fd232f4 100644
--- a/lib/check_funcs.cygpart
+++ b/lib/check_funcs.cygpart
@@ -543,9 +543,9 @@ check_vala_module() {
 	return ${ret};
 }
 
-#****f* Information/DEPEND
+#****f* Information/BUILD_REQUIRES
 #  SYNOPSIS
-#  DEPEND="ATOM [ATOM] ..."
+#  BUILD_REQUIRES="ATOM [ATOM] ..."
 #  DESCRIPTION
 #  A list of build-time (not runtime) dependencies to be checked before calling
 #  src_compile.  Each ATOM can be in one of the following forms:
@@ -565,6 +565,8 @@ check_vala_module() {
 #  * tex(foo.ext): TeX modules
 #  * vala(foo-1.0): Vala bindings
 #  * foo: A Cygwin package (check skipped on non-Cygwin build systems)
+#
+# DEPEND is an obsolete synonym for BUILD_REQUIRES.
 #****
 __check_depends() {
 	local atom failed_atoms;
@@ -574,14 +576,14 @@ __check_depends() {
 	        error "Compiling this package requires $(cross_compiling && echo -n ${CHOST}' ')binutils and gcc"
 	fi
 
-	if ! defined DEPEND
+	if ! defined BUILD_REQUIRES
 	then
 		return 0;
 	fi
 
 	__deparenthesize() { echo "$@" | sed -e 's|[a-z]*(\([^)]*\))|\1|' ; }
 
-	for atom in ${DEPEND}
+	for atom in ${BUILD_REQUIRES}
 	do
 		case ${atom} in
 		girepository\(*)
-- 
2.16.1

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [PATCH cygport 0/2] Better handling of build requires (v2)
  2018-02-13 12:34   ` Jon Turney
@ 2018-02-13 13:03     ` Jon Turney
  2018-02-13 13:03       ` [PATCH cygport 2/2] Pass BUILD_REQUIRES through to .hint for source package as build-requires: Jon Turney
  2018-02-13 13:03       ` [PATCH cygport 1/2] Rename DEPEND to BUILD_REQUIRES Jon Turney
  0 siblings, 2 replies; 11+ messages in thread
From: Jon Turney @ 2018-02-13 13:03 UTC (permalink / raw)
  To: cygwin-apps; +Cc: Jon Turney

v2: BUILD_REQUIRES

Jon Turney (2):
  Rename DEPEND to BUILD_REQUIRES
  Pass BUILD_REQUIRES through to .hint for source package as
    build-requires:

 bin/cygport.in          |  7 +++++++
 lib/check_funcs.cygpart | 10 ++++++----
 lib/pkg_pkg.cygpart     |  5 +++++
 3 files changed, 18 insertions(+), 4 deletions(-)

-- 
2.16.1

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [PATCH cygport 2/2] Pass BUILD_REQUIRES through to .hint for source package as build-requires:
  2018-02-13 13:03     ` [PATCH cygport 0/2] Better handling of build requires (v2) Jon Turney
@ 2018-02-13 13:03       ` Jon Turney
  2018-02-13 13:03       ` [PATCH cygport 1/2] Rename DEPEND to BUILD_REQUIRES Jon Turney
  1 sibling, 0 replies; 11+ messages in thread
From: Jon Turney @ 2018-02-13 13:03 UTC (permalink / raw)
  To: cygwin-apps; +Cc: Jon Turney

Converting a dependency atom to a package name with full generality requires
a database of all the pathnames contained in all packages, so we don't even
try to do that here.

In the fullness of time, calm may have the information needed to perform
that task, at which time it can start emitting build-requires: lines for
source packages into setup.ini.
---
 lib/pkg_pkg.cygpart | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/lib/pkg_pkg.cygpart b/lib/pkg_pkg.cygpart
index 272e2d4..fe56d6d 100644
--- a/lib/pkg_pkg.cygpart
+++ b/lib/pkg_pkg.cygpart
@@ -728,6 +728,10 @@ _EOF
 			then
 				cat >> ${distdir}/${PN}/${distsubdir}/${pkg_name[${n}]}-${PVR}.hint <<-_EOF
 external-source: ${PN}
+_EOF
+			else
+				cat >> ${distdir}/${PN}/${distsubdir}/${pkg_name[${n}]}-${PVR}.hint <<-_EOF
+build-depends: ${BUILD_REQUIRES}
 _EOF
 			fi
 			if defined ${pkg_message_var}
@@ -841,6 +845,7 @@ _EOF
 			cat > ${distdir}/${PN}/${PN}-${PVR}.hint <<-_EOF
 category: ${!pkg_category_var:-${CATEGORY}}
 requires:
+build-depends: ${BUILD_REQUIRES}
 sdesc: "${!pkg_summary_var:-${SUMMARY}}"
 ldesc: "${!pkg_description_var:-${DESCRIPTION:-${!pkg_summary_var:-${SUMMARY}}}}"
 skip:
-- 
2.16.1

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH cygport 0/2] Better handling of build depends
  2017-10-03 19:53 [PATCH cygport 0/2] Better handling of build depends Jon Turney
                   ` (2 preceding siblings ...)
  2018-02-13  6:31 ` [PATCH cygport 0/2] Better handling of build depends Yaakov Selkowitz
@ 2020-03-24  3:06 ` Yaakov Selkowitz
  3 siblings, 0 replies; 11+ messages in thread
From: Yaakov Selkowitz @ 2020-03-24  3:06 UTC (permalink / raw)
  To: cygwin-apps

On Tue, 2017-10-03 at 20:53 +0100, Jon Turney wrote:
> Jon Turney (2):
>   Rename DEPEND to BUILD_DEPENDS
>   Pass BUILD_DEPENDS through to .hint for source package as
>     build-depends:
> 
>  lib/check_funcs.cygpart | 17 ++++++++++++-----
>  lib/pkg_pkg.cygpart     |  5 +++++
>  2 files changed, 17 insertions(+), 5 deletions(-)

Pushed somewhat modified to git master, please test.

--
Yaakov



^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2020-03-24  3:06 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-10-03 19:53 [PATCH cygport 0/2] Better handling of build depends Jon Turney
2017-10-03 19:53 ` [PATCH cygport 2/2] Pass BUILD_DEPENDS through to .hint for source package as build-depends: Jon Turney
2017-10-03 19:53 ` [PATCH cygport 1/2] Rename DEPEND to BUILD_DEPENDS Jon Turney
2017-10-03 20:17   ` Andrew Schulman
2017-11-13 12:57   ` Jon Turney
2018-02-13  6:31 ` [PATCH cygport 0/2] Better handling of build depends Yaakov Selkowitz
2018-02-13 12:34   ` Jon Turney
2018-02-13 13:03     ` [PATCH cygport 0/2] Better handling of build requires (v2) Jon Turney
2018-02-13 13:03       ` [PATCH cygport 2/2] Pass BUILD_REQUIRES through to .hint for source package as build-requires: Jon Turney
2018-02-13 13:03       ` [PATCH cygport 1/2] Rename DEPEND to BUILD_REQUIRES Jon Turney
2020-03-24  3:06 ` [PATCH cygport 0/2] Better handling of build depends Yaakov Selkowitz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).