Skip to content

Commit

Permalink
update to 0.54.1
Browse files Browse the repository at this point in the history
  • Loading branch information
ycollet committed Jan 3, 2024
1 parent e6c35b2 commit 92e8eef
Show file tree
Hide file tree
Showing 12 changed files with 479 additions and 82 deletions.
82 changes: 82 additions & 0 deletions pure-data/dekencpu
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
#!/bin/sh

# get the "Deken CPU" for the given arch.
# This is mainly targetted at Debian's ${DEB_HOST_ARCH}
# it works for many cases of ${DEB_HOST_ARCH_CPU} resp
# ${DEB_HOST_GNU_CPU}, but not for all
# (notably the 'x32' Debian architecture has both
# DEB_HOST_(ARCH|GNU)_CPU set to some x86_64 value)

archmap_() {
cat <<EOF
# x86 family
i386 i386
i486 i386
i586 i386
i686 i386
x86 i386
x32 i386 # x86_64 CPU, but 32bit pointers
amd64 amd64
x64 amd64
x86_64 amd64
hurd-i386 i386
hurd-amd64 amd64
kfreebsd-i386 i386
kfreebsd-amd64 amd64
# arm family
arm armv5
armel armv6
armeb armv6b
armhf armv7
aarch64 arm64
arm64 arm64
arm64ilp32 arm64 # ???
# PowerPC family
powerpc ppc
powerpcel ppcl
powerpcspe ppc # ?
powerpc64 ppc64
ppwerpc64el ppc64l
powerpc64le ppc64l
ppc64el ppc64l
# MIPS family
mips mips
mipsel mipsel
mips64 mips64
mips64el mips64el
# others
# (we just map the original arch to same name
# so no need to enumerate all of them)
EOF
}
archmap() {
archmap_ | sed -e 's|#.*||' -e 's|[[:space:]]*$||' -e '/^$/d'
}

usage() {
cat >/dev/stderr <<EOF
usage: $0 <cpu>
Prints the 'deken CPU' (as used in the filename for Pd-externals) for the given Debian (or GNU) architecture.
Examples:
$0 \$(dpkg-architecture -qDEB_HOST_ARCH)
$0 \${DEB_HOST_ARCH}
EOF
}

cpu="$1"

if [ -z "${cpu}" ]; then
usage
exit 1
fi

dekcpu=$(archmap | grep -E "^${cpu}\b" | awk '{print $2}')

echo "${dekcpu:-$cpu}"

155 changes: 155 additions & 0 deletions pure-data/export.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,155 @@
Description: Export required symbols and retract some other symbols
Author: IOhannes m zmölnig
Origin: Debian
Bug: https://github.com/pure-data/pure-data/issues/2122
Last-Update: 2023-11-02
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- puredata.orig/src/m_pd.h
+++ puredata/src/m_pd.h
@@ -12,7 +12,6 @@
#define PD_MINOR_VERSION 54
#define PD_BUGFIX_VERSION 1
#define PD_TEST_VERSION ""
-extern int pd_compatibilitylevel; /* e.g., 43 for pd 0.43 compatibility */

/* old name for "MSW" flag -- we have to take it for the sake of many old
"nmakefiles" for externs, which will define NT and not MSW */
@@ -903,6 +902,7 @@

/* get version number at run time */
EXTERN void sys_getversion(int *major, int *minor, int *bugfix);
+EXTERN int pd_compatibilitylevel; /* e.g., 43 for pd 0.43 compatibility */

/* get floatsize at run time */
EXTERN unsigned int sys_getfloatsize(void);
--- puredata.orig/src/s_stuff.h
+++ puredata/src/s_stuff.h
@@ -38,7 +38,7 @@
/* s_main.c */
extern int sys_debuglevel;
extern int sys_verbose;
-extern int sys_noloadbang;
+EXTERN int sys_noloadbang;
EXTERN int sys_havegui(void);
extern const char *sys_guicmd;

@@ -249,7 +249,7 @@
/* s_midi.c */
#define MAXMIDIINDEV 16 /* max. number of input ports */
#define MAXMIDIOUTDEV 16 /* max. number of output ports */
-extern int sys_midiapi;
+EXTERN int sys_midiapi;
extern int sys_nmidiin;
extern int sys_nmidiout;
extern int sys_midiindevlist[];
@@ -346,7 +346,7 @@
#endif

void sys_set_priority(int higher);
-extern int sys_hipriority; /* real-time flag, true if priority boosted */
+EXTERN int sys_hipriority; /* real-time flag, true if priority boosted */

/* s_print.c */

--- puredata.orig/src/m_imp.h
+++ puredata/src/m_imp.h
@@ -102,6 +102,7 @@
EXTERN void glob_initfromgui(void *dummy, t_symbol *s, int argc, t_atom *argv);
EXTERN void glob_quit(void *dummy); /* glob_exit(0); */
EXTERN void glob_exit(void *dummy, t_float status);
+EXTERN void glob_watchdog(t_pd *dummy);
EXTERN void open_via_helppath(const char *name, const char *dir);

#define __m_imp_h_
--- puredata.orig/src/d_fft_fftsg.c
+++ puredata/src/d_fft_fftsg.c
@@ -109,12 +109,12 @@
}

/* -------- public routines -------- */
-EXTERN void mayer_fht(t_sample *fz, int n)
+void mayer_fht(t_sample *fz, int n)
{
post("FHT: not yet implemented");
}

-EXTERN void mayer_dofft(t_sample *fz1, t_sample *fz2, int n, int sgn)
+void mayer_dofft(t_sample *fz1, t_sample *fz2, int n, int sgn)
{
FFTFLT *buf, *fp3;
int i;
@@ -137,17 +137,17 @@
}
}

-EXTERN void mayer_fft(int n, t_sample *fz1, t_sample *fz2)
+void mayer_fft(int n, t_sample *fz1, t_sample *fz2)
{
mayer_dofft(fz1, fz2, n, -1);
}

-EXTERN void mayer_ifft(int n, t_sample *fz1, t_sample *fz2)
+void mayer_ifft(int n, t_sample *fz1, t_sample *fz2)
{
mayer_dofft(fz1, fz2, n, 1);
}

-EXTERN void mayer_realfft(int n, t_sample *fz)
+void mayer_realfft(int n, t_sample *fz)
{
FFTFLT *buf, *fp3;
int i, nover2 = n/2;
@@ -165,7 +165,7 @@
*fp1 = fp3[0], *fp2 = fp3[1];
}

-EXTERN void mayer_realifft(int n, t_sample *fz)
+void mayer_realifft(int n, t_sample *fz)
{
FFTFLT *buf, *fp3;
int i, nover2 = n/2;
--- puredata.orig/src/d_fft_fftw.c
+++ puredata/src/d_fft_fftw.c
@@ -167,7 +167,7 @@
}


-EXTERN void mayer_fht(t_sample *fz, int n)
+void mayer_fht(t_sample *fz, int n)
{
post("FHT: not yet implemented");
}
@@ -189,12 +189,12 @@
fz1[i] = fz[i*2], fz2[i] = fz[i*2+1];
}

-EXTERN void mayer_fft(int n, t_sample *fz1, t_sample *fz2)
+void mayer_fft(int n, t_sample *fz1, t_sample *fz2)
{
mayer_do_cfft(n, fz1, fz2, 1);
}

-EXTERN void mayer_ifft(int n, t_sample *fz1, t_sample *fz2)
+void mayer_ifft(int n, t_sample *fz1, t_sample *fz2)
{
mayer_do_cfft(n, fz1, fz2, 0);
}
@@ -205,7 +205,7 @@
but it's probably the mayer_fft that should be corrected...
*/

-EXTERN void mayer_realfft(int n, t_sample *fz)
+void mayer_realfft(int n, t_sample *fz)
{
int i;
rfftw_info *p = rfftw_getplan(n, 1);
@@ -221,7 +221,7 @@
fz[i] = -p->out[i];
}

-EXTERN void mayer_realifft(int n, t_sample *fz)
+void mayer_realifft(int n, t_sample *fz)
{
int i;
rfftw_info *p = rfftw_getplan(n, 0);
104 changes: 104 additions & 0 deletions pure-data/libpd_example.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
Description: Fix Makefile to allow compiling libpd example
Author: IOhannes m zmönig
Origin: Debian
Forwarded: not-needed
Last-Update: 2023-07-05
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- puredata.orig/libpd/test_libpd/Makefile
+++ puredata/libpd/test_libpd/Makefile
@@ -1,84 +1,26 @@
-# This is a makefile to build "test_libpd". It assumes that libpd is in the
-# source directory "../" and that libpd is already built.
-
-# detect platform
-UNAME = $(shell uname)
-SOLIB_PREFIX = lib
-
-ifeq ($(UNAME), Darwin) # Mac
- SOLIB_EXT = dylib
- STATICLIB_EXT = a
- PLATFORM = mac
-else
- ifeq ($(OS), Windows_NT) # Windows, use Mingw
- SOLIB_PREFIX =
- SOLIB_EXT = dll
- STATICLIB_EXT = lib
- PLATFORM = windows
- else # assume Linux
- SOLIB_EXT = so
- STATICLIB_EXT = a
- PLATFORM = linux
- endif
-endif
-
-PD_DIR = ../..
-LIBPD_DIR = ..
-LIBPD = $(LIBPD_DIR)/$(SOLIB_PREFIX)pd.$(SOLIB_EXT)
-LIBPD_STATIC = $(LIBPD_DIR)/libpd.$(STATICLIB_EXT)
-
+# This is a makefile to build "test_libpd".
SRC_FILES = test_libpd.c
TARGET = test_libpd

-CFLAGS = -I$(PD_DIR)/src -O3
-
-.PHONY: libs clean-libs clean clobber
-
all: $(TARGET)

-##### libs
-
-$(LIBPD):
- cp $(LIBPD_DIR)/$(LIBPD) .
-
-# on windows, copy libpd and MinGW winpthread dll to here
-ifeq ($(PLATFORM), windows)
-
-LDFLAGS = $(LIBPD)
-
-PTHREAD_DIR = ${MINGW_PREFIX}/bin
-PTHREAD = libwinpthread-1.dll
-
-$(PTHREAD):
- cp $(PTHREAD_DIR)/$(PTHREAD) .
-
-libs: $(LIBPD) $(PTHREAD)
-
-clean-libs:
- rm -f $(LIBPD) $(PTHREAD)
-
-# mac & linux
-else
-
-# force static linking? make STATIC=true
ifeq ($(STATIC), true)
-LDFLAGS = $(LIBPD_STATIC)
-else # copy libpd to here by default
-LDFLAGS = $(LIBPD)
-libs: $(LIBPD)
+LDFLAGS += -l:libpd.a -lm
+else
+LDFLAGS += -lpd
endif

-clean-libs:
- rm -f $(LIBPD)
+LDFLAGS += -lc

-endif
+CPPFLAGS += -I/usr/include/pd

##### target

-$(TARGET): ${SRC_FILES:.c=.o} libs
- $(CC) -o $@ ${SRC_FILES:.c=.o} $(LDFLAGS)
+$(TARGET): ${SRC_FILES:.c=.o}
+ $(CC) -o $@ ${SRC_FILES:.c=.o} $(LDFLAGS) $(LIBS)

##### clean

-clean: clean-libs
+.PHONY: clean all
+clean:
rm -f $(TARGET) *.o
20 changes: 20 additions & 0 deletions pure-data/libpd_visibility.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
Description: reduce visibility of symbols inlibpd
by compiling the binary with visbility=hidden
Author: IOhannes m zmölnig
Bug: https://github.com/pure-data/pure-data/issues/569
Last-Update: 2021-12-21
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- puredata.orig/src/Makefile.am
+++ puredata/src/Makefile.am
@@ -28,6 +28,10 @@

libpdbin_PROGRAMS =

+# reduce visibility of libpd symbols
+libpd_la_CPPFLAGS += -DEXTERN='__attribute__ ((visibility("default"))) extern'
+libpd_la_CFLAGS += -fvisibility=hidden
+
# there are pd_* and pd_*_core variables as we need different flags on Windows
# for the DLL and the EXE, other OSes simply set pd_* = $(pd_*_core) later
# also, the "_core" suffix is used as this keeps automake from thinking these
12 changes: 5 additions & 7 deletions pure-data/pd-patch-etc-gui-plugins.patch
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,18 @@ Date: Tue, 29 Jan 2019 11:31:36 +0100
Subject: search for GUI plugins in /etc/pd/plugins-enabled

Origin: Debian
Last-Update: 2016-02-17

this gives us a standard path where the user can symlink-enable their
system-wide GUI plugins.
Last-Update: 2016-02-17
Last-Update: 2023-11-02
Forwarded: not-needed
---
tcl/pd-gui.tcl | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tcl/pd-gui.tcl b/tcl/pd-gui.tcl
index 6408a0b..fa221d7 100755
--- a/tcl/pd-gui.tcl
+++ b/tcl/pd-gui.tcl
@@ -803,7 +803,7 @@ proc load_startup_plugins {} {
--- puredata.orig/tcl/pd-gui.tcl
+++ puredata/tcl/pd-gui.tcl
@@ -775,7 +775,7 @@
}

# load other installed plugins
Expand Down
Loading

0 comments on commit 92e8eef

Please sign in to comment.