Hi. This adds pkgconfig .pc file generation to the build system. Patch attached. OK to apply? Dan, could you add the corresponding autotools part? Regards, R. -- Fedora http://fedoraproject.org/wiki/User:Rathann Livna http://rpm.livna.org | MPlayer http://mplayerhq.hu "Faith manages." -- Delenn to Lennier in Babylon 5:"Confessions and Lamentations"
Il giorno dom, 13/07/2008 alle 14.39 +0200, Dominik 'Rathann' Mierzejewski ha scritto:
Hi.
This adds pkgconfig .pc file generation to the build system.
Patch attached. OK to apply? Dan, could you add the corresponding autotools part?
Regards, R.
ok
On Sunday, 13 July 2008 at 17:19, Nico Sabbi wrote:
Il giorno dom, 13/07/2008 alle 14.39 +0200, Dominik 'Rathann' Mierzejewski ha scritto:
Hi.
This adds pkgconfig .pc file generation to the build system.
Patch attached. OK to apply? Dan, could you add the corresponding autotools part?
ok
Applied with fixes for problems noticed by Uoti. -- Fedora http://fedoraproject.org/wiki/User:Rathann Livna http://rpm.livna.org | MPlayer http://mplayerhq.hu "Faith manages." -- Delenn to Lennier in Babylon 5:"Confessions and Lamentations"
On Sun, Jul 13, 2008 at 02:39:18PM +0200, Dominik 'Rathann' Mierzejewski wrote:
Hi.
This adds pkgconfig .pc file generation to the build system.
Patch attached. OK to apply? Dan, could you add the corresponding autotools part?
Shoot. I'd done this about a month ago, but never committed it. Dominik, one thing that would make the autotools much easier would be to have a .pc.in file that we can substitute values in with sed. Then it can just be another output from configure. Below is what I did before. Do you think we can handle them this way? -- Dan
From 1f81ad3509a269638444276675ffbb0ce41ec3d3 Mon Sep 17 00:00:00 2001 From: Dan Nicholson <dbn.lists@gmail.com> Date: Sun, 8 Jun 2008 17:04:11 -0700 Subject: [PATCH] pkg-config support for libdvdnav and libdvdnavmini
--- Makefile | 29 +++++++++++++++++++++++++---- configure.ac | 2 ++ misc/Makefile.am | 3 +++ misc/libdvdnav.pc.in | 12 ++++++++++++ misc/libdvdnavmini.pc.in | 11 +++++++++++ 5 files changed, 53 insertions(+), 4 deletions(-) create mode 100644 misc/libdvdnav.pc.in create mode 100644 misc/libdvdnavmini.pc.in diff --git a/Makefile b/Makefile index 5595842..9c1f7bb 100644 --- a/Makefile +++ b/Makefile @@ -39,13 +39,13 @@ DEPS= ${OBJS:%.o=%.d} BUILDDEPS = Makefile config.mak ifeq ($(BUILD_SHARED),yes) -all: $(SHLIB) $(MINI_SHLIB) dvdnav-config -install: $(SHLIB) install-shared install-dvdnav-config +all: $(SHLIB) $(MINI_SHLIB) dvdnav-config pkgconfig +install: $(SHLIB) install-shared install-dvdnav-config install-pkgconfig endif ifeq ($(BUILD_STATIC),yes) -all: $(LIB) dvdnav-config -install: $(LIB) install-static install-dvdnav-config +all: $(LIB) dvdnav-config pkgconfig +install: $(LIB) install-static install-dvdnav-config install-pkgconfig endif install: install-headers @@ -140,6 +140,27 @@ install-dvdnav-config: dvdnav-config install -d $(DESTDIR)$(PREFIX)/bin install -m 0755 $(.OBJDIR)/dvdnav-config $(DESTDIR)$(PREFIX)/bin/dvdnav-config +pcedit = sed \ + -e 's,@prefix@,$(PREFIX),' \ + -e 's,@exec_prefix@,$(PREFIX),' \ + -e 's,@libdir@,$(shlibdir),' \ + -e 's,@includedir@,$(PREFIX)/include,' \ + -e 's,@VERSION@,$(SHLIB_VERSION),' \ + -e 's,@THREAD_CFLAGS@,,' \ + -e 's,@THREAD_LIBS@,$(THREADLIB),' \ + -e 's,@DVDREAD_CFLAGS@,$(DVDREAD_CFLAGS),' + +pkgconfig: $(.OBJDIR)/libdvdnav.pc $(.OBJDIR)/libdvdnavmini.pc +$(.OBJDIR)/libdvdnav.pc: misc/libdvdnav.pc.in $(.OBJDIR) + $(pcedit) $< > $@ +$(.OBJDIR)/libdvdnavmini.pc: misc/libdvdnavmini.pc.in $(.OBJDIR) + $(pcedit) $< > $@ + +install-pkgconfig: $(.OBJDIR)/libdvdnav.pc $(.OBJDIR)/libdvdnavmini.pc + install -d $(DESTDIR)$(libdir)/pkgconfig + install -m 0644 $(.OBJDIR)/libdvdnav.pc $(DESTDIR)$(libdir)/pkgconfig + install -m 0644 $(.OBJDIR)/libdvdnavmini.pc \ + $(DESTDIR)$(libdir)/pkgconfig vpath %.so ${.OBJDIR} vpath %.o ${.OBJDIR} diff --git a/configure.ac b/configure.ac index 970827b..632ebca 100644 --- a/configure.ac +++ b/configure.ac @@ -251,6 +251,8 @@ src/Makefile src/vm/Makefile misc/Makefile misc/dvdnav-config +misc/libdvdnav.pc +misc/libdvdnavmini.pc misc/libdvdnav.spec misc/relchk.sh m4/Makefile diff --git a/misc/Makefile.am b/misc/Makefile.am index 7047018..baf5fb9 100644 --- a/misc/Makefile.am +++ b/misc/Makefile.am @@ -3,3 +3,6 @@ include $(top_srcdir)/misc/Makefile.common EXTRA_DIST = dvdnav-config.in libdvdnav.spec.in libdvdnav.spec Makefile.common relchk.sh relchk.sh.in bin_SCRIPTS = dvdnav-config + +pkgconfigdir = $(libdir)/pkgconfig +pkgconfig_DATA = libdvdnav.pc libdvdnavmini.pc diff --git a/misc/libdvdnav.pc.in b/misc/libdvdnav.pc.in new file mode 100644 index 0000000..a15f908 --- /dev/null +++ b/misc/libdvdnav.pc.in @@ -0,0 +1,12 @@ +prefix=@prefix@ +exec_prefix=@exec_prefix@ +libdir=@libdir@ +includedir=@includedir@ + +Name: libdvdnav +Description: DVD Navigation library +Version: @VERSION@ + +Requires: dvdread +Cflags: -I${includedir} @THREAD_CFLAGS@ +Libs: -L${libdir} -ldvdnav @THREAD_LIBS@ diff --git a/misc/libdvdnavmini.pc.in b/misc/libdvdnavmini.pc.in new file mode 100644 index 0000000..52945b3 --- /dev/null +++ b/misc/libdvdnavmini.pc.in @@ -0,0 +1,11 @@ +prefix=@prefix@ +exec_prefix=@exec_prefix@ +libdir=@libdir@ +includedir=@includedir@ + +Name: libdvdnavmini +Description: DVD Navigation mini library +Version: @VERSION@ + +Cflags: -I${includedir} @DVDREAD_CFLAGS@ @THREAD_CFLAGS@ +Libs: -L${libdir} -ldvdnav @THREAD_LIBS@ -- 1.5.6.2
On Sunday, 13 July 2008 at 21:19, Dan Nicholson wrote:
On Sun, Jul 13, 2008 at 02:39:18PM +0200, Dominik 'Rathann' Mierzejewski wrote:
Hi.
This adds pkgconfig .pc file generation to the build system.
Patch attached. OK to apply? Dan, could you add the corresponding autotools part?
Shoot. I'd done this about a month ago, but never committed it. Dominik, one thing that would make the autotools much easier would be to have a .pc.in file that we can substitute values in with sed. Then it can just be another output from configure. Below is what I did before. Do you think we can handle them this way?
Yes, I guess we should. Unfortunately I've already committed my patches so there's a conflict now... I guess I'll revert mine and work with yours instead.
--- /dev/null +++ b/misc/libdvdnav.pc.in @@ -0,0 +1,12 @@ +prefix=@prefix@ +exec_prefix=@exec_prefix@ +libdir=@libdir@ +includedir=@includedir@ + +Name: libdvdnav +Description: DVD Navigation library +Version: @VERSION@ + +Requires: dvdread
This needs to be Requires.private. libdvdnav doesn't expose any libdvdread symbols to the public. Looks fine otherwise. Regards, R. -- Fedora http://fedoraproject.org/wiki/User:Rathann Livna http://rpm.livna.org | MPlayer http://mplayerhq.hu "Faith manages." -- Delenn to Lennier in Babylon 5:"Confessions and Lamentations"
On Sunday, 13 July 2008 at 21:57, Dominik 'Rathann' Mierzejewski wrote:
On Sunday, 13 July 2008 at 21:19, Dan Nicholson wrote:
On Sun, Jul 13, 2008 at 02:39:18PM +0200, Dominik 'Rathann' Mierzejewski wrote:
Hi.
This adds pkgconfig .pc file generation to the build system.
Patch attached. OK to apply? Dan, could you add the corresponding autotools part?
Shoot. I'd done this about a month ago, but never committed it. Dominik, one thing that would make the autotools much easier would be to have a .pc.in file that we can substitute values in with sed. Then it can just be another output from configure. Below is what I did before. Do you think we can handle them this way?
Yes, I guess we should. Unfortunately I've already committed my patches so there's a conflict now... I guess I'll revert mine and work with yours instead.
On second thought, no. I'll just apply the missing parts and make necessary changes. Regards, R. -- Fedora http://fedoraproject.org/wiki/User:Rathann Livna http://rpm.livna.org | MPlayer http://mplayerhq.hu "Faith manages." -- Delenn to Lennier in Babylon 5:"Confessions and Lamentations"
On Sun, Jul 13, 2008 at 1:03 PM, Dominik 'Rathann' Mierzejewski <dominik@greysector.net> wrote:
On Sunday, 13 July 2008 at 21:57, Dominik 'Rathann' Mierzejewski wrote:
On Sunday, 13 July 2008 at 21:19, Dan Nicholson wrote:
On Sun, Jul 13, 2008 at 02:39:18PM +0200, Dominik 'Rathann' Mierzejewski wrote:
Hi.
This adds pkgconfig .pc file generation to the build system.
Patch attached. OK to apply? Dan, could you add the corresponding autotools part?
Shoot. I'd done this about a month ago, but never committed it. Dominik, one thing that would make the autotools much easier would be to have a .pc.in file that we can substitute values in with sed. Then it can just be another output from configure. Below is what I did before. Do you think we can handle them this way?
Yes, I guess we should. Unfortunately I've already committed my patches so there's a conflict now... I guess I'll revert mine and work with yours instead.
On second thought, no. I'll just apply the missing parts and make necessary changes.
Yeah, that's what I had in mind. I just posted my patch to show what I did instead of trying to explain it. I'll fix it in a few hours if you don't get to it first. -- Dan
On Sunday, 13 July 2008 at 22:19, Dan Nicholson wrote:
On Sun, Jul 13, 2008 at 1:03 PM, Dominik 'Rathann' Mierzejewski <dominik@greysector.net> wrote:
On Sunday, 13 July 2008 at 21:57, Dominik 'Rathann' Mierzejewski wrote:
On Sunday, 13 July 2008 at 21:19, Dan Nicholson wrote:
On Sun, Jul 13, 2008 at 02:39:18PM +0200, Dominik 'Rathann' Mierzejewski wrote:
Hi.
This adds pkgconfig .pc file generation to the build system.
Patch attached. OK to apply? Dan, could you add the corresponding autotools part?
Shoot. I'd done this about a month ago, but never committed it. Dominik, one thing that would make the autotools much easier would be to have a .pc.in file that we can substitute values in with sed. Then it can just be another output from configure. Below is what I did before. Do you think we can handle them this way?
Yes, I guess we should. Unfortunately I've already committed my patches so there's a conflict now... I guess I'll revert mine and work with yours instead.
On second thought, no. I'll just apply the missing parts and make necessary changes.
Yeah, that's what I had in mind. I just posted my patch to show what I did instead of trying to explain it. I'll fix it in a few hours if you don't get to it first.
Applied with small changes. -- Fedora http://fedoraproject.org/wiki/User:Rathann Livna http://rpm.livna.org | MPlayer http://mplayerhq.hu "Faith manages." -- Delenn to Lennier in Babylon 5:"Confessions and Lamentations"
participants (3)
-
Dan Nicholson -
Dominik 'Rathann' Mierzejewski -
Nico Sabbi