I've packaged up a bunch of libraries as pd packages, and they rely on headers besides just m_pd.h. These headers should be included in the 'make install' so that people can easily build them. I think we should install these headers into /usr/include:
m_pd.h s_stuff.h m_imp.h g_canvas.h g_all_guis.h
I expect IOhannes to follow with his counterproposal... ;)
.hc
On 2010-08-04 21:29, Hans-Christoph Steiner wrote:
I've packaged up a bunch of libraries as pd packages, and they rely on headers besides just m_pd.h. These headers should be included in the 'make install' so that people can easily build them. I think we should install these headers into /usr/include:
m_pd.h s_stuff.h m_imp.h g_canvas.h g_all_guis.h
I expect IOhannes to follow with his counterproposal... ;)
here we go:
i'm _strongly_ against installing a header named "s_stuff.h" as /usr/include/s_stuff.h as a name for a public header its close to "header1.h". of course "s_stuff.h" was never meant to be a public header (for a short discussion see [1])
now, i am also _strongly_ with hans, that some of these headers should be made available, in order to be able to build a huge number of non-trivial (and thus probably more interesting) externals. (e.g. a lot of externals are missing in Debian, just because they cannot be built without these headers)
in order to not pollute the /usr/include/ directory with "s_stuff.h", "m_imp.h" and "x_header.h" files (and in order to not interfere with the "foo" package, which also provides "s_stuff.h"), i suggest to put them into a separate directory: /usr/include/pd/ or rather: ${prefix}/include/pd/
this is common practice, e.g. see [2]
this basically provides full backwards compatibility: until now people had to specify the pd-source path in order to include the private headers; now the pd-"source" simply lives in /usr/include/pd/ rather than /home/zmoelnig/src/pd-0.43-0/src
i would also like to provide a pkg-config file, so externals could be build with something like:
cc $(pkg-config --cflags --libs pd) -o foo.pd_linux foo.c
mfgsadr IOhannes
[1] on the privateness of Pd's header people should be made aware of the fact, that everything outside of "m_pd.h" is not a stable API, but that doesn't mean that the headers must not be distributed. i think it would be enough, if there was a text telling people that "this file describes Pd implementation details which may change in future releases" (quoting s_stuff.h) one could also issue a compiler "#warning", if the file is included without PD_INTERNAL set.
[2] http://www.openismus.com/documents/linux/building_libraries/building_librari...
in order to not pollute /usr/include/ with files like s_stuff.h and to prevent name-clashes with other packages, headers should go into a special subdirectory.
"make install" installs headers into "${includedir}/pd"
to make this directory findeable, this also includes pkg-config support --- Makefile.am | 4 ++++ configure.ac | 4 +++- pd.pc.in | 22 ++++++++++++++++++++++ src/Makefile.am | 5 ++++- 4 files changed, 33 insertions(+), 2 deletions(-) create mode 100644 pd.pc.in
diff --git a/Makefile.am b/Makefile.am index cbca131..26a8cb6 100644 --- a/Makefile.am +++ b/Makefile.am @@ -4,6 +4,10 @@ ACLOCAL_AMFLAGS = -I m4 CFLAGS += @DEFS@ EXTRA_SUBDIRS =
+# pkg-config support +pkgconfigdir = $(libdir)/pkgconfig +pkgconfig_DATA = pd.pc + if ASIO EXTRA_SUBDIRS += asio endif diff --git a/configure.ac b/configure.ac index 80e609f..95e578d 100644 --- a/configure.ac +++ b/configure.ac @@ -226,7 +226,9 @@ AC_CONFIG_FILES([Makefile portmidi/Makefile tcl/Makefile po/Makefile - src/Makefile]) + src/Makefile + pd.pc + ])
AC_OUTPUT
diff --git a/pd.pc.in b/pd.pc.in new file mode 100644 index 0000000..2150dd0 --- /dev/null +++ b/pd.pc.in @@ -0,0 +1,22 @@ +# Pure data pkg-config file +# LATER: shouldn't "--libs" output all flags for building an external? + +prefix=@prefix@ +exec_prefix=@exec_prefix@ +libdir=@libdir@ +includedir=@includedir@ + +############################### +# variables +# the default file-extension for externals (e.g. "l_i386") +extension=@EXTENSION@ +# where to install externals +externaldir=${libdir}/pd/extra + +############################### +# core configuration +Name: pd +Description: Pure data externals +Version: @PACKAGE_VERSION@ +Libs: +Cflags: -I${includedir}/pd -DPD diff --git a/src/Makefile.am b/src/Makefile.am index 4f85211..7b7a72a 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -30,7 +30,10 @@ pd_SOURCES = g_canvas.c g_graph.c g_text.c g_rtext.c g_array.c g_template.c \ x_arithmetic.c x_connective.c x_interface.c x_midi.c x_misc.c \ x_time.c x_acoustics.c x_net.c x_qlist.c x_gui.c x_list.c d_soundfile.c
-include_HEADERS = m_pd.h m_imp.h g_canvas.h s_stuff.h +pd_includedir = ${includedir}/pd +pd_include_HEADERS = m_pd.h m_imp.h g_canvas.h s_stuff.h +# compatibility: m_pd.h also goes into ${includedir}/ +include_HEADERS = m_pd.h noinst_HEADERS = g_all_guis.h s_audio_alsa.h s_audio_pablio.h s_audio_paring.h
A couple points on this:
- g_all_guis.h should go into /usr/include/pd too, I know of at least one external that uses it for a GUI object.
- seems like two copies of m_pd.h (/usr/include and /usr/include/pd) could cause troubles, no? Maybe /usr/include/m_pd.h should be something like this:
/* The Pure Data header file m_pd.h used to live here.
As of the 0.43 release, we're installing multiple Pd headers, so they're all moving to a pd/ subdirectory. This file is present just to keep old software still compiling. Please update your code to use the new path for the header. */ #include <pd/m_pd.h>
- if this patch is accepted by Miller, I am ok with the Debian package puredata-dev doing this also.
.hc
On Aug 5, 2010, at 5:08 AM, IOhannes m zmoelnig wrote:
in order to not pollute /usr/include/ with files like s_stuff.h and to prevent name-clashes with other packages, headers should go into a special subdirectory.
"make install" installs headers into "${includedir}/pd"
to make this directory findeable, this also includes pkg-config support
Makefile.am | 4 ++++ configure.ac | 4 +++- pd.pc.in | 22 ++++++++++++++++++++++ src/Makefile.am | 5 ++++- 4 files changed, 33 insertions(+), 2 deletions(-) create mode 100644 pd.pc.in
diff --git a/Makefile.am b/Makefile.am index cbca131..26a8cb6 100644 --- a/Makefile.am +++ b/Makefile.am @@ -4,6 +4,10 @@ ACLOCAL_AMFLAGS = -I m4 CFLAGS += @DEFS@ EXTRA_SUBDIRS =
+# pkg-config support +pkgconfigdir = $(libdir)/pkgconfig +pkgconfig_DATA = pd.pc
if ASIO EXTRA_SUBDIRS += asio endif diff --git a/configure.ac b/configure.ac index 80e609f..95e578d 100644 --- a/configure.ac +++ b/configure.ac @@ -226,7 +226,9 @@ AC_CONFIG_FILES([Makefile portmidi/Makefile tcl/Makefile po/Makefile
src/Makefile])
src/Makefile
pd.pc
])
AC_OUTPUT
diff --git a/pd.pc.in b/pd.pc.in new file mode 100644 index 0000000..2150dd0 --- /dev/null +++ b/pd.pc.in @@ -0,0 +1,22 @@ +# Pure data pkg-config file +# LATER: shouldn't "--libs" output all flags for building an external?
+prefix=@prefix@ +exec_prefix=@exec_prefix@ +libdir=@libdir@ +includedir=@includedir@
+############################### +# variables +# the default file-extension for externals (e.g. "l_i386") +extension=@EXTENSION@ +# where to install externals +externaldir=${libdir}/pd/extra
+############################### +# core configuration +Name: pd +Description: Pure data externals +Version: @PACKAGE_VERSION@ +Libs: +Cflags: -I${includedir}/pd -DPD diff --git a/src/Makefile.am b/src/Makefile.am index 4f85211..7b7a72a 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -30,7 +30,10 @@ pd_SOURCES = g_canvas.c g_graph.c g_text.c g_rtext.c g_array.c g_template.c \ x_arithmetic.c x_connective.c x_interface.c x_midi.c x_misc.c \ x_time.c x_acoustics.c x_net.c x_qlist.c x_gui.c x_list.c d_soundfile.c
-include_HEADERS = m_pd.h m_imp.h g_canvas.h s_stuff.h +pd_includedir = ${includedir}/pd +pd_include_HEADERS = m_pd.h m_imp.h g_canvas.h s_stuff.h +# compatibility: m_pd.h also goes into ${includedir}/ +include_HEADERS = m_pd.h noinst_HEADERS = g_all_guis.h s_audio_alsa.h s_audio_pablio.h s_audio_paring.h
-- 1.7.1
Pd-dev mailing list Pd-dev@iem.at http://lists.puredata.info/listinfo/pd-dev
----------------------------------------------------------------------------
'You people have such restrictive dress for women,’ she said, hobbling away in three inch heels and panty hose to finish out another pink- collar temp pool day. - “Hijab Scene #2", by Mohja Kahf
On Thu, 2010-08-05 at 10:07 +0200, IOhannes m zmoelnig wrote:
On 2010-08-04 21:29, Hans-Christoph Steiner wrote:
I've packaged up a bunch of libraries as pd packages, and they rely on headers besides just m_pd.h. These headers should be included in the 'make install' so that people can easily build them. I think we should install these headers into /usr/include:
m_pd.h s_stuff.h m_imp.h g_canvas.h g_all_guis.h
I expect IOhannes to follow with his counterproposal... ;)
here we go:
i'm _strongly_ against installing a header named "s_stuff.h" as /usr/include/s_stuff.h as a name for a public header its close to "header1.h". of course "s_stuff.h" was never meant to be a public header (for a short discussion see [1])
now, i am also _strongly_ with hans, that some of these headers should be made available, in order to be able to build a huge number of non-trivial (and thus probably more interesting) externals. (e.g. a lot of externals are missing in Debian, just because they cannot be built without these headers)
in order to not pollute the /usr/include/ directory with "s_stuff.h", "m_imp.h" and "x_header.h" files (and in order to not interfere with the "foo" package, which also provides "s_stuff.h"), i suggest to put them into a separate directory: /usr/include/pd/ or rather: ${prefix}/include/pd/
this is common practice, e.g. see [2]
this basically provides full backwards compatibility: until now people had to specify the pd-source path in order to include the private headers; now the pd-"source" simply lives in /usr/include/pd/ rather than /home/zmoelnig/src/pd-0.43-0/src
i would also like to provide a pkg-config file, so externals could be build with something like:
cc $(pkg-config --cflags --libs pd) -o foo.pd_linux foo.c
mfgsadr IOhannes
[1] on the privateness of Pd's header people should be made aware of the fact, that everything outside of "m_pd.h" is not a stable API, but that doesn't mean that the headers must not be distributed. i think it would be enough, if there was a text telling people that "this file describes Pd implementation details which may change in future releases" (quoting s_stuff.h) one could also issue a compiler "#warning", if the file is included without PD_INTERNAL set.
[2] http://www.openismus.com/documents/linux/building_libraries/building_librari...
Upon second thought, I think IOhannes' plan is the way to go. I'll implement the patch if you haven't already.
.hc