diff mbox

gpsd: Add package version to libgpsmm patch

Message ID 1333628924-8966-1-git-send-email-markos.chandras@imgtec.com
State Not Applicable
Headers show

Commit Message

Markos Chandras April 5, 2012, 12:28 p.m. UTC
If the buildroot infrastructure finds a patch file that contains the
$PKG-$VERSION tuple in the filename, it will only apply this kind of
patches, ignoring the rest of the patches in the package directory.
As a result of which, the gpsd-fix-libgpsmm.patch did not apply
because the gpsd-2.95-navcom.patch satisfies the $PKG-$VERSION convention.
The patch was renamed to match the rest of the patches in the gpsd folder.

Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
---
 package/gpsd/gpsd-2.95-fix-libgpsmm.patch |   23 +++++++++++++++++++++++
 package/gpsd/gpsd-fix-libgpsmm.patch      |   23 -----------------------
 2 files changed, 23 insertions(+), 23 deletions(-)
 create mode 100644 package/gpsd/gpsd-2.95-fix-libgpsmm.patch
 delete mode 100644 package/gpsd/gpsd-fix-libgpsmm.patch

Comments

Markos Chandras May 11, 2012, 8:22 a.m. UTC | #1
On 04/05/2012 01:28 PM, Markos Chandras wrote:

> If the buildroot infrastructure finds a patch file that contains the
> $PKG-$VERSION tuple in the filename, it will only apply this kind of
> patches, ignoring the rest of the patches in the package directory.
> As a result of which, the gpsd-fix-libgpsmm.patch did not apply
> because the gpsd-2.95-navcom.patch satisfies the $PKG-$VERSION convention.
> The patch was renamed to match the rest of the patches in the gpsd folder.
> 
> Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
> ---
>  package/gpsd/gpsd-2.95-fix-libgpsmm.patch |   23 +++++++++++++++++++++++
>  package/gpsd/gpsd-fix-libgpsmm.patch      |   23 -----------------------
>  2 files changed, 23 insertions(+), 23 deletions(-)
>  create mode 100644 package/gpsd/gpsd-2.95-fix-libgpsmm.patch
>  delete mode 100644 package/gpsd/gpsd-fix-libgpsmm.patch
> 
> diff --git a/package/gpsd/gpsd-2.95-fix-libgpsmm.patch
> b/package/gpsd/gpsd-2.95-fix-libgpsmm.patch
> new file mode 100644
> index 0000000..893965e
> --- /dev/null
> +++ b/package/gpsd/gpsd-2.95-fix-libgpsmm.patch
> @@ -0,0 +1,23 @@
> +diff -Nura gpsd-2.95.orig/Makefile.in gpsd-2.95.x/Makefile.in
> +--- gpsd-2.95.orig/Makefile.in 2010-07-13 19:48:24.000000000 -0300
> ++++ gpsd-2.95.x/Makefile.in    2010-07-27 17:40:28.902568874 -0300
> +@@ -546,7 +546,7 @@
> + libgps_VERSION__REVISION = 0
> + libgps_VERSION_AGE = 0
> + libgps_VERSION_NUMBER =
> $(libgps_VERSION_AGE):$(libgps_VERSION__REVISION):$(libgps_VERSION_AGE)
> +-libgps_la_LDFLAGS = -version-number
> $(libgps_VERSION_CURRENT):$(libgps_VERSION__REVISION):$(libgps_VERSION_AGE)
> ++libgps_la_LDFLAGS = -version-number
> $(libgps_VERSION_CURRENT):$(libgps_VERSION__REVISION):$(libgps_VERSION_AGE)
> $(LDFLAGS)
> + lib_LTLIBRARIES = libgps.la libgpsd.la
> + libgps_SONAME = $(shell expr $(libgps_VERSION_CURRENT) -
> $(libgps_VERSION_AGE))
> + libgps_VERSION =
> $(libgps_SONAME).$(libgps_VERSION_AGE).$(libgps_VERSION__REVISION)
> +@@ -612,8 +612,8 @@
> + libgpsd_la_SOURCES = $(libgpsd_c_sources) $(libgpsd_h_sources) \
> +                               driver_rtcm2.h packet_states.h
> +
> +-@LIBGPSMM_ENABLE_FALSE@libgps_la_LINK = /bin/sh ./libtool --tag=CC
> --mode=link gcc $(libgps_la_LDFLAGS) -o $@
> +-@LIBGPSMM_ENABLE_TRUE@libgps_la_LINK = /bin/sh ./libtool --tag=CXX
> --mode=link g++ $(libgps_la_LDFLAGS) -o $@
> ++@LIBGPSMM_ENABLE_FALSE@libgps_la_LINK = /bin/sh ./libtool --tag=CC
> --mode=link $(CC) $(libgps_la_LDFLAGS) -o $@
> ++@LIBGPSMM_ENABLE_TRUE@libgps_la_LINK = /bin/sh ./libtool --tag=CXX
> --mode=link $(CXX) $(libgps_la_LDFLAGS) -o $@
> + nodist_libgpsd_la_SOURCES = packet_names.h ais_json.i
> + libgps_la_LIBADD = $(LIBM) $(LIBC) $(LIBNSL) $(LIBSOCKET) $(LIBPTHREAD)
> + libgpsd_la_LIBADD = $(LIBM) $(LIBC) $(LIBNSL) $(LIBSOCKET)
> $(LIBPTHREAD) $(BLUEZ_LIBS) libgps.la
> diff --git a/package/gpsd/gpsd-fix-libgpsmm.patch
> b/package/gpsd/gpsd-fix-libgpsmm.patch
> deleted file mode 100644
> index 893965e..0000000
> --- a/package/gpsd/gpsd-fix-libgpsmm.patch
> +++ /dev/null
> @@ -1,23 +0,0 @@
> -diff -Nura gpsd-2.95.orig/Makefile.in gpsd-2.95.x/Makefile.in
> ---- gpsd-2.95.orig/Makefile.in 2010-07-13 19:48:24.000000000 -0300
> -+++ gpsd-2.95.x/Makefile.in    2010-07-27 17:40:28.902568874 -0300
> -@@ -546,7 +546,7 @@
> - libgps_VERSION__REVISION = 0
> - libgps_VERSION_AGE = 0
> - libgps_VERSION_NUMBER =
> $(libgps_VERSION_AGE):$(libgps_VERSION__REVISION):$(libgps_VERSION_AGE)
> --libgps_la_LDFLAGS = -version-number
> $(libgps_VERSION_CURRENT):$(libgps_VERSION__REVISION):$(libgps_VERSION_AGE)
> -+libgps_la_LDFLAGS = -version-number
> $(libgps_VERSION_CURRENT):$(libgps_VERSION__REVISION):$(libgps_VERSION_AGE)
> $(LDFLAGS)
> - lib_LTLIBRARIES = libgps.la libgpsd.la
> - libgps_SONAME = $(shell expr $(libgps_VERSION_CURRENT) -
> $(libgps_VERSION_AGE))
> - libgps_VERSION =
> $(libgps_SONAME).$(libgps_VERSION_AGE).$(libgps_VERSION__REVISION)
> -@@ -612,8 +612,8 @@
> - libgpsd_la_SOURCES = $(libgpsd_c_sources) $(libgpsd_h_sources) \
> -                               driver_rtcm2.h packet_states.h
> -
> --@LIBGPSMM_ENABLE_FALSE@libgps_la_LINK = /bin/sh ./libtool --tag=CC
> --mode=link gcc $(libgps_la_LDFLAGS) -o $@
> --@LIBGPSMM_ENABLE_TRUE@libgps_la_LINK = /bin/sh ./libtool --tag=CXX
> --mode=link g++ $(libgps_la_LDFLAGS) -o $@
> -+@LIBGPSMM_ENABLE_FALSE@libgps_la_LINK = /bin/sh ./libtool --tag=CC
> --mode=link $(CC) $(libgps_la_LDFLAGS) -o $@
> -+@LIBGPSMM_ENABLE_TRUE@libgps_la_LINK = /bin/sh ./libtool --tag=CXX
> --mode=link $(CXX) $(libgps_la_LDFLAGS) -o $@
> - nodist_libgpsd_la_SOURCES = packet_names.h ais_json.i
> - libgps_la_LIBADD = $(LIBM) $(LIBC) $(LIBNSL) $(LIBSOCKET) $(LIBPTHREAD)
> - libgpsd_la_LIBADD = $(LIBM) $(LIBC) $(LIBNSL) $(LIBSOCKET)
> $(LIBPTHREAD) $(BLUEZ_LIBS) libgps.la
> --
> 1.7.1
> 


ping? :)
Thomas Petazzoni May 11, 2012, 8:43 a.m. UTC | #2
Le Thu, 5 Apr 2012 13:28:44 +0100,
Markos Chandras <markos.chandras@imgtec.com> a écrit :

>  package/gpsd/gpsd-2.95-fix-libgpsmm.patch |   23 +++++++++++++++++++++++
>  package/gpsd/gpsd-fix-libgpsmm.patch      |   23 -----------------------

Actually these days, the idea is just the opposite: remove the version
from the patch names. So it's the other patches that should be renamed
<pkg>-<description>.patch instead of
<pkg>-<version>-<description>.patch.

Regards,

Thomas
Markos Chandras May 11, 2012, 8:51 a.m. UTC | #3
On 05/11/2012 09:43 AM, Thomas Petazzoni wrote:

> Le Thu, 5 Apr 2012 13:28:44 +0100,
> Markos Chandras <markos.chandras@imgtec.com> a écrit :
> 
>>  package/gpsd/gpsd-2.95-fix-libgpsmm.patch |   23 +++++++++++++++++++++++
>>  package/gpsd/gpsd-fix-libgpsmm.patch      |   23 -----------------------
> 
> Actually these days, the idea is just the opposite: remove the version
> from the patch names. So it's the other patches that should be renamed
> <pkg>-<description>.patch instead of
> <pkg>-<version>-<description>.patch.
> 
> Regards,
> 
> Thomas
> --
> Thomas Petazzoni, Free Electrons
> Kernel, drivers, real-time and embedded Linux
> development, consulting, training and support.
> http://free-electrons.com
> _______________________________________________
> buildroot mailing list
> buildroot@busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
> 

Hi Thomas,

Ok I didn't know what the preferred way of fixing this problem was. I
will prepare a new patch then.
Thomas Petazzoni May 11, 2012, 9:01 a.m. UTC | #4
Le Fri, 11 May 2012 09:51:34 +0100,
Markos Chandras <Markos.Chandras@imgtec.com> a écrit :

> Ok I didn't know what the preferred way of fixing this problem was. I
> will prepare a new patch then.

Yeah, we haven't made it explicit yet by changing the patching logic,
but we have decided at the last Buildroot Developer meeting to do the
following:

"""
---------------------------------------------------------------------

7. Infrastructure for applying patches, i.e. how should patches be
named

---------------------------------------------------------------------

Non-versioned patches
    package/foo/<seqnum>-*.patch
Versioned patches
    package/foo/version/<seqnum>-*.patch

Patches are either versioned, or they are not. Versioned patches
should only be created for packages that have multiple supported
versions.
"""

This was part of the Developer meeting report sent to the list by
Arnout on February, 16th 2012.

Regards,

Thomas
diff mbox

Patch

diff --git a/package/gpsd/gpsd-2.95-fix-libgpsmm.patch b/package/gpsd/gpsd-2.95-fix-libgpsmm.patch
new file mode 100644
index 0000000..893965e
--- /dev/null
+++ b/package/gpsd/gpsd-2.95-fix-libgpsmm.patch
@@ -0,0 +1,23 @@ 
+diff -Nura gpsd-2.95.orig/Makefile.in gpsd-2.95.x/Makefile.in
+--- gpsd-2.95.orig/Makefile.in	2010-07-13 19:48:24.000000000 -0300
++++ gpsd-2.95.x/Makefile.in	2010-07-27 17:40:28.902568874 -0300
+@@ -546,7 +546,7 @@
+ libgps_VERSION__REVISION = 0
+ libgps_VERSION_AGE = 0
+ libgps_VERSION_NUMBER = $(libgps_VERSION_AGE):$(libgps_VERSION__REVISION):$(libgps_VERSION_AGE)
+-libgps_la_LDFLAGS = -version-number $(libgps_VERSION_CURRENT):$(libgps_VERSION__REVISION):$(libgps_VERSION_AGE)
++libgps_la_LDFLAGS = -version-number $(libgps_VERSION_CURRENT):$(libgps_VERSION__REVISION):$(libgps_VERSION_AGE) $(LDFLAGS)
+ lib_LTLIBRARIES = libgps.la libgpsd.la
+ libgps_SONAME = $(shell expr $(libgps_VERSION_CURRENT) - $(libgps_VERSION_AGE))
+ libgps_VERSION = $(libgps_SONAME).$(libgps_VERSION_AGE).$(libgps_VERSION__REVISION)
+@@ -612,8 +612,8 @@
+ libgpsd_la_SOURCES = $(libgpsd_c_sources) $(libgpsd_h_sources) \
+ 				driver_rtcm2.h packet_states.h
+ 
+-@LIBGPSMM_ENABLE_FALSE@libgps_la_LINK = /bin/sh ./libtool --tag=CC --mode=link gcc $(libgps_la_LDFLAGS) -o $@
+-@LIBGPSMM_ENABLE_TRUE@libgps_la_LINK = /bin/sh ./libtool --tag=CXX --mode=link g++ $(libgps_la_LDFLAGS) -o $@
++@LIBGPSMM_ENABLE_FALSE@libgps_la_LINK = /bin/sh ./libtool --tag=CC --mode=link $(CC) $(libgps_la_LDFLAGS) -o $@
++@LIBGPSMM_ENABLE_TRUE@libgps_la_LINK = /bin/sh ./libtool --tag=CXX --mode=link $(CXX) $(libgps_la_LDFLAGS) -o $@
+ nodist_libgpsd_la_SOURCES = packet_names.h ais_json.i
+ libgps_la_LIBADD = $(LIBM) $(LIBC) $(LIBNSL) $(LIBSOCKET) $(LIBPTHREAD)
+ libgpsd_la_LIBADD = $(LIBM) $(LIBC) $(LIBNSL) $(LIBSOCKET) $(LIBPTHREAD) $(BLUEZ_LIBS) libgps.la
diff --git a/package/gpsd/gpsd-fix-libgpsmm.patch b/package/gpsd/gpsd-fix-libgpsmm.patch
deleted file mode 100644
index 893965e..0000000
--- a/package/gpsd/gpsd-fix-libgpsmm.patch
+++ /dev/null
@@ -1,23 +0,0 @@ 
-diff -Nura gpsd-2.95.orig/Makefile.in gpsd-2.95.x/Makefile.in
---- gpsd-2.95.orig/Makefile.in	2010-07-13 19:48:24.000000000 -0300
-+++ gpsd-2.95.x/Makefile.in	2010-07-27 17:40:28.902568874 -0300
-@@ -546,7 +546,7 @@
- libgps_VERSION__REVISION = 0
- libgps_VERSION_AGE = 0
- libgps_VERSION_NUMBER = $(libgps_VERSION_AGE):$(libgps_VERSION__REVISION):$(libgps_VERSION_AGE)
--libgps_la_LDFLAGS = -version-number $(libgps_VERSION_CURRENT):$(libgps_VERSION__REVISION):$(libgps_VERSION_AGE)
-+libgps_la_LDFLAGS = -version-number $(libgps_VERSION_CURRENT):$(libgps_VERSION__REVISION):$(libgps_VERSION_AGE) $(LDFLAGS)
- lib_LTLIBRARIES = libgps.la libgpsd.la
- libgps_SONAME = $(shell expr $(libgps_VERSION_CURRENT) - $(libgps_VERSION_AGE))
- libgps_VERSION = $(libgps_SONAME).$(libgps_VERSION_AGE).$(libgps_VERSION__REVISION)
-@@ -612,8 +612,8 @@
- libgpsd_la_SOURCES = $(libgpsd_c_sources) $(libgpsd_h_sources) \
- 				driver_rtcm2.h packet_states.h
- 
--@LIBGPSMM_ENABLE_FALSE@libgps_la_LINK = /bin/sh ./libtool --tag=CC --mode=link gcc $(libgps_la_LDFLAGS) -o $@
--@LIBGPSMM_ENABLE_TRUE@libgps_la_LINK = /bin/sh ./libtool --tag=CXX --mode=link g++ $(libgps_la_LDFLAGS) -o $@
-+@LIBGPSMM_ENABLE_FALSE@libgps_la_LINK = /bin/sh ./libtool --tag=CC --mode=link $(CC) $(libgps_la_LDFLAGS) -o $@
-+@LIBGPSMM_ENABLE_TRUE@libgps_la_LINK = /bin/sh ./libtool --tag=CXX --mode=link $(CXX) $(libgps_la_LDFLAGS) -o $@
- nodist_libgpsd_la_SOURCES = packet_names.h ais_json.i
- libgps_la_LIBADD = $(LIBM) $(LIBC) $(LIBNSL) $(LIBSOCKET) $(LIBPTHREAD)
- libgpsd_la_LIBADD = $(LIBM) $(LIBC) $(LIBNSL) $(LIBSOCKET) $(LIBPTHREAD) $(BLUEZ_LIBS) libgps.la