I have some difficulties to compile Pd-extended-0.43.4
I woold like to write an ebuild for GNU/Gentoo Linux for pd-overlay.
First, i try to compile by hand:
cd pd-extended/pd
./autogen.sh
./configure --enable-jack --prefix=`pwd`/../../install
make
make install
no error in compilation
but when I
cd ../../install/bin
./pd
I have this error:
willy@music-linux-desktop ~/install/bin $ ./pd
disabling real-time priority due to missing pd-watchdog (/home/willy/install/bin/../bin/pd-watchdog)
Error in startup script: couldn't read file "/home/willy/install/bin/../tcl//pd-gui.tcl": no such file or directory
application of the first patch make some Hunk failed:
willy@music-linux-desktop ~/pd-extended/pd $ patch < ../../0001-fix-install-targets-add-enable-unix-layout-and-insta.patch
patching file Makefile.am
Hunk #2 FAILED at 50.
1 out of 2 hunks FAILED -- saving rejects to file Makefile.am.rej
patching file configure.ac
Hunk #2 succeeded at 78 (offset -4 lines).
patching file Makefile.am
Hunk #1 FAILED at 5.
1 out of 1 hunk FAILED -- saving rejects to file Makefile.am.rej
patching file Makefile.am
Hunk #1 FAILED at 20.
1 out of 1 hunk FAILED -- saving rejects to file Makefile.am.rej
patching file Makefile.am
Hunk #1 FAILED at 12.
Hunk #2 FAILED at 94.
Hunk #3 FAILED at 109.
Hunk #4 FAILED at 122.
Hunk #5 FAILED at 130.
5 out of 5 hunks FAILED -- saving rejects to file Makefile.am.rej
patching file pd-gui
patching file Makefile.am
Hunk #1 FAILED at 2.
1 out of 1 hunk FAILED -- saving rejects to file Makefile.am.rej
So, I try to write new patch for pd 0.43.4
When I do this, I see that "a/extra/Makefile.am" does not exist anymore.
For doing the patch:
diff -Naur pd_original pd_modified > pd-extended_0.43.4-fix-install-targets.patch
And for apply after:
willy@music-linux-desktop ~/pd-extended/pd $ patch -p1 < ../../pd-extended_0.43.4-fix-install-targets.patch
patching file Makefile.am
patching file configure.ac
patching file po/Makefile.am
patching file src/Makefile.am
patching file src/pd-gui
patching file tcl/Makefile.am
Finally we configure with:
./configure --enable-jack --enable-unix-layout --prefix=`pwd`/../../install
But I still have the same problem:
willy@music-linux-desktop ~/install/bin $ ./pd
disabling real-time priority due to missing pd-watchdog (/home/willy/install/bin/../bin/pd-watchdog)
Error in startup script: couldn't read file "/home/willy/install/bin/../tcl//pd-gui.tcl": no such file or directory
Did I forget something??
The patch
----------
diff -Naur pd_original/Makefile.am pd_modified/Makefile.am
--- pd_original/Makefile.am 2013-01-19 21:02:04.000000000 +0100
+++ pd_modified/Makefile.am 2013-07-31 16:10:20.582094468 +0200
@@ -2,7 +2,7 @@
ACLOCAL_AMFLAGS = -I m4/generated -I m4
CFLAGS += @DEFS@
-EXTRA_SUBDIRS =
+EXTRA_SUBDIRS =
# pkg-config support
pkgconfigdir = $(libdir)/pkgconfig
@@ -29,15 +29,12 @@
# subdirs that are always included in the dist, etc.
DIST_SUBDIRS = asio man po portaudio portmidi src tcl
-BUILT_SOURCES =
+BUILT_SOURCES =
if MSGFMT
BUILT_SOURCES += locales
endif
-## FIXXXME
-## $(pkglibdir) is used throughout the other Makefile.amS
-## simply ignoring the special case for other OSs...
-if LINUX
+if UNIX_LAYOUT
libpddir = $(pkglibdir)
else
libpddir = $(prefix)
@@ -54,6 +51,11 @@
$(INSTALL) -d $(DESTDIR)$(libpddir)/extra
$(INSTALL_DATA) extra/output~.pd extra/output~-help.pd $(DESTDIR)$(libpddir)/extra
$(INSTALL) -d $(DESTDIR)$(libpddir)/startup
+if UNIX_LAYOUT
+# so pd-gui.tcl can find ../bin/pd and pd can find pd-watchdog
+ $(INSTALL) -d $(DESTDIR)$(pkglibdir)
+ $(LN_S) $(prefix)/bin $(DESTDIR)$(pkglibdir)/bin
+endif
# this is at the end because its loooong
# these files go into libpddir defined above
diff -Naur pd_original/configure.ac pd_modified/configure.ac
--- pd_original/configure.ac 2013-01-19 21:02:04.000000000 +0100
+++ pd_modified/configure.ac 2013-07-31 16:11:50.228098604 +0200
@@ -45,6 +45,10 @@
EXTERNAL_CFLAGS="-fPIC"
EXTERNAL_LDFLAGS="-Wl,--export-dynamic -shared -fPIC"
EXTERNAL_EXTENSION=pd_linux
+ # on GNU/Linux use the complicated, UNIX-style install by default
+ if test -z $unix_layout; then
+ unix_layout=yes
+ fi
;;
*mingw*)
WINDOWS=yes
@@ -74,6 +78,12 @@
LDFLAGS="${LDFLAGS} ${ARCH_LDFLAGS}"
fi
+AC_ARG_ENABLE([unix_layout],
+ [AS_HELP_STRING([--enable-unix-layout],
+ [use the "complicated", UNIX-style directory layout for installing the build products using 'make install'])],
+ [unix_layout=$enableval])
+AM_CONDITIONAL(UNIX_LAYOUT, test x$unix_layout = xyes)
+
AM_CONDITIONAL(ANDROID, test x$ANDROID = xyes)
AM_CONDITIONAL(IPHONEOS, test x$IPHONEOS = xyes)
AM_CONDITIONAL(LINUX, test x$LINUX = xyes)
@@ -121,7 +131,7 @@
AC_HEADER_STDC
-dnl Cygwin has sys/soundcard.h but Pd isn't ready for Cygwin since it only
+dnl Cygwin has sys/soundcard.h but Pd isn't ready for Cygwin since it only
dnl includes OSS for UNIX
AC_CHECK_HEADER(sys/soundcard.h, [oss=yes], [oss=no])
AM_CONDITIONAL(OSS, test x$oss = xyes)
@@ -189,7 +199,7 @@
AC_ARG_ENABLE([portaudio],
[AS_HELP_STRING([--disable-portaudio],
[do not use portaudio])],
- [portaudio=$enableval])
+ [portaudio=$enableval])
AM_CONDITIONAL(PORTAUDIO, test x$portaudio = xyes)
dnl portmidi
@@ -260,7 +270,5 @@
AS_IF([test x$windows = xyes], [
AS_IF([test x$asio = xno], [
AC_MSG_RESULT(
-ASIO SDK not found! You need to download asiosdk2.2.zip from:
+ASIO SDK not found! You need to download asiosdk2.2.zip from:
-
-
diff -Naur pd_original/po/Makefile.am pd_modified/po/Makefile.am
--- pd_original/po/Makefile.am 2013-01-19 21:02:04.000000000 +0100
+++ pd_modified/po/Makefile.am 2013-07-31 16:15:08.639107759 +0200
@@ -12,14 +12,19 @@
FILES = $(addprefix ../tcl/, $(TCLFILES)) iemgui_dynamic_strings.tcl pd_dynamic_strings.tcl
-# these are the supported languages,
+# these are the supported languages,
ALL_LINGUAS = af az be bg ca cs da de el en_ca en_gb es es_mx eu fr gd gu he hi hu it ja ko lt lv nl pa pt pt_pt ru sk sq sv tr vi zh_cn zh_tw
POFILES = $(ALL_LINGUAS:=.po)
MSGFILES = $(ALL_LINGUAS:=.msg)
TEMPLATE = template.pot
+if UNIX_LAYOUT
libpdpodir = $(pkglibdir)/po
+else
+libpdpodir = $(prefix)/po
+endif
+
libpdpo_DATA = $(MSGFILES)
dist_libpdpo_DATA =
diff -Naur pd_original/src/Makefile.am pd_modified/src/Makefile.am
--- pd_original/src/Makefile.am 2013-01-19 21:02:00.000000000 +0100
+++ pd_modified/src/Makefile.am 2013-07-31 16:17:11.017113405 +0200
@@ -3,19 +3,20 @@
pd_CFLAGS = -DPD -DINSTALL_PREFIX=\"$(prefix)\"
pd_LDFLAGS =
-pdsend_CFLAGS =
-pdreceive_CFLAGS =
-pd_watchdog_CFLAGS =
-LIBS =
+pdsend_CFLAGS =
+pdreceive_CFLAGS =
+pd_watchdog_CFLAGS =
+LIBS =
INCLUDES = @INCLUDES@
SUFFIXES = .@EXTENSION@ .@SHARED_LIB@
bin_PROGRAMS = pd pdsend pdreceive
+bin_SCRIPTS = pd-gui
pdsend_SOURCES = u_pdsend.c
pdreceive_SOURCES = u_pdreceive.c
pd_watchdog_SOURCES = s_watchdog.c
-pd_LDADD =
+pd_LDADD =
pd_SOURCES = g_canvas.c g_graph.c g_text.c g_rtext.c g_array.c g_template.c \
g_io.c g_scalar.c g_traversal.c g_guiconnect.c g_readwrite.c g_editor.c \
g_all_guis.c \
@@ -101,7 +102,6 @@
pd_SOURCES += s_midi_pm.c
endif
-
# FIXXXME
# GNU/HURD, IPHONEOS, ... have no MIDI (not even OSS)
# i think it would be better to add s_midi_dummy.c only if no other midi API can be found
@@ -115,10 +115,7 @@
pd_SOURCES += s_midi_dummy.c
endif
-if LINUX
-libpdbindir = $(pkglibdir)/bin
-libpdbin_DATA =
-libpdbin_PROGRAMS = pd-watchdog pd
+if LINUX
# this flag has to have a single leading "-" for libtool, even though ld uses
# --export-dynamic, and libtool sends -Wl,--export-dynamic to ld...
pd_LDFLAGS += -export-dynamic
@@ -129,7 +126,6 @@
if MACOSX
LIBS += -framework Carbon
pd_CFLAGS += -DMACOSX #kludge, should use auto macro __APPLE__
-bin_SCRIPTS =
bin_PROGRAMS += pd-watchdog
endif
@@ -137,7 +133,6 @@
LIBS += -lwsock32 -lwinmm -lole32
pd_CFLAGS += -DUSEAPI_MMIO -DPD_INTERNAL
pd_SOURCES += s_audio_mmio.c s_midi_mmio.c scandir.c
-bin_SCRIPTS =
endif
if MINGW
diff -Naur pd_original/src/pd-gui pd_modified/src/pd-gui
--- pd_original/src/pd-gui 1970-01-01 01:00:00.000000000 +0100
+++ pd_modified/src/pd-gui 2013-07-31 16:17:39.996114742 +0200
@@ -0,0 +1,4 @@
+#!/bin/sh
+# this script launches Pd by running the GUI first, which then starts pd
+
+`dirname $0`/../lib/pd/tcl/pd-gui.tcl $@
diff -Naur pd_original/tcl/Makefile.am pd_modified/tcl/Makefile.am
--- pd_original/tcl/Makefile.am 2013-01-19 21:01:59.000000000 +0100
+++ pd_modified/tcl/Makefile.am 2013-07-31 16:18:30.255117060 +0200
@@ -2,11 +2,13 @@
SUFFIXES = .tcl
-bin_SCRIPTS = pd-gui.tcl
-
+if UNIX_LAYOUT
libpdtcldir = $(pkglibdir)/tcl
+else
+libpdtcldir = $(prefix)/tcl
+endif
+
dist_libpdtcl_SCRIPTS = pd-gui.tcl
dist_libpdtcl_DATA = apple_events.tcl dialog_canvas.tcl dialog_gatom.tcl dialog_path.tcl pd_bindings.tcl pd_menus.tcl pdwindow.tcl scrollboxwindow.tcl AppMain.tcl dialog_data.tcl dialog_iemgui.tcl dialog_startup.tcl pd_connect.tcl pdtk_array.tcl pkgIndex.tcl wheredoesthisgo.tcl dialog_array.tcl dialog_find.tcl dialog_message.tcl helpbrowser.tcl makeapp.tcl pdtk_canvas.tcl pkg_mkIndex.tcl dialog_audio.tcl dialog_font.tcl dialog_midi.tcl opt_parser.tcl pd_menucommands.tcl pdtk_text.tcl scrollbox.tcl pd_guiprefs.tcl pd.gif
ETAGS_ARGS = $(ETAGS) --language=none --regex="/proc[ \t]+\([^ \t]+\)/\1/" *.tcl
-