aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans-Christoph Steiner <eighthave@users.sourceforge.net>2006-02-22 06:13:49 +0000
committerHans-Christoph Steiner <eighthave@users.sourceforge.net>2006-02-22 06:13:49 +0000
commit778c90c2f187cdb4e311ca96c9aea626313370a7 (patch)
tree1d077555659712023a3d3620fdbf77167909a2c4
parent1eabfbfa0df32e2f2d6b2f8e71fb516ccc812672 (diff)
version is now all defined in macros in m_pd.h in the complete_version_defines patch, and the regexps in packages/Makefile now rely on that patch
svn path=/trunk/; revision=4608
-rw-r--r--packages/Makefile14
-rw-r--r--packages/Makefile.buildlayout2
-rw-r--r--packages/patches/complete_version_defines-0.39.2.patch55
3 files changed, 64 insertions, 7 deletions
diff --git a/packages/Makefile b/packages/Makefile
index 79db6132..b2ed5b50 100644
--- a/packages/Makefile
+++ b/packages/Makefile
@@ -652,19 +652,21 @@ patch_pd:
done
-rm -f -- $(pd_src)/src/configure $(pd_src)/src/makefile
# change Pd's version number to reflect the extended build
+# this needs the complete_version_defines patch to work
cd $(pd_src)/src/ && \
- sed 's/\(pd_version\[\] = "Pd version \)[0-9extndRC.-]*/\1$(PD_VERSION)-$(PACKAGE_VERSION)/' s_main.c > s_main.c.tmp && \
- mv s_main.c.tmp s_main.c
+ sed 's|^\(#define PD_TEST_VERSION "\).*"|\1$(PACKAGE_VERSION)"|' m_pd.h > \
+ m_pd.h.tmp && mv m_pd.h.tmp m_pd.h
@echo " "
@echo "patching succeeded!"
unpatch_pd:
-# this sed pattern won't work with TEST versions
+# change the version number back to the original
+# this needs the complete_version_defines patch to work
cd $(pd_src)/src && \
- sed 's/\(pd_version\[\] = "Pd version [0-9]\.[0-9]*[.-][0-9]*\)[0-9extndRC.-]*/\1/' \
- s_main.c > s_main.c.tmp && \
- mv s_main.c.tmp s_main.c
+ sed 's|^\(#define PD_TEST_VERSION ".*\)$(PACKAGE_VERSION)"|\1"|' \
+ m_pd.h > m_pd.h.tmp && \
+ mv m_pd.h.tmp m_pd.h
# apply all platform-specific patches
for patch in $(wildcard $(CWD)/patches/$(OS_NAME)/*.patch); do \
echo "Applying $$patch"; \
diff --git a/packages/Makefile.buildlayout b/packages/Makefile.buildlayout
index 9fef3fee..2ec384cd 100644
--- a/packages/Makefile.buildlayout
+++ b/packages/Makefile.buildlayout
@@ -151,7 +151,7 @@ PD_VERSION = $(PD_MAJOR_VERSION).$(PD_MINOR_VERSION).$(PD_BUGFIX_VERSION)
# release version for this distro
-PACKAGE_VERSION = extended-RC8
+PACKAGE_VERSION = extended-test1
PACKAGE_NAME = Pd-$(PD_VERSION)-$(PACKAGE_VERSION)
diff --git a/packages/patches/complete_version_defines-0.39.2.patch b/packages/patches/complete_version_defines-0.39.2.patch
new file mode 100644
index 00000000..9fd51d32
--- /dev/null
+++ b/packages/patches/complete_version_defines-0.39.2.patch
@@ -0,0 +1,55 @@
+Index: s_main.c
+===================================================================
+RCS file: /cvsroot/pure-data/pd/src/s_main.c,v
+retrieving revision 1.20
+diff -u -w -r1.20 s_main.c
+--- s_main.c 2 Dec 2005 04:58:24 -0000 1.20
++++ s_main.c 22 Feb 2006 05:54:28 -0000
+@@ -2,10 +2,6 @@
+ * For information on usage and redistribution, and for a DISCLAIMER OF ALL
+ * WARRANTIES, see the file, "LICENSE.txt," in this distribution. */
+
+-char pd_version[] = "Pd version 0.39-2\n";
+-char pd_compiletime[] = __TIME__;
+-char pd_compiledate[] = __DATE__;
+-
+ #include "m_pd.h"
+ #include "m_imp.h"
+ #include "s_stuff.h"
+@@ -26,6 +22,10 @@
+ #include <winbase.h>
+ #endif
+
++char *pd_version;
++char pd_compiletime[] = __TIME__;
++char pd_compiledate[] = __DATE__;
++
+ void pd_init(void);
+ int sys_argparse(int argc, char **argv);
+ void sys_findprogdir(char *progname);
+@@ -254,6 +254,9 @@
+ if (sys_argparse(argc-1, argv+1)) /* parse cmd line */
+ return (1);
+ sys_afterargparse(); /* post-argparse settings */
++ /* build version string from defines in m_pd.h */
++ asprintf(&pd_version, "Pd version %d.%d-%d%s\n",PD_MAJOR_VERSION,
++ PD_MINOR_VERSION,PD_BUGFIX_VERSION,PD_TEST_VERSION);
+ if (sys_verbose || sys_version) fprintf(stderr, "%scompiled %s %s\n",
+ pd_version, pd_compiletime, pd_compiledate);
+ if (sys_version) /* if we were just asked our version, exit here. */
+Index: m_pd.h
+===================================================================
+RCS file: /cvsroot/pure-data/pd/src/m_pd.h,v
+retrieving revision 1.8
+diff -u -w -r1.8 m_pd.h
+--- m_pd.h 19 Aug 2005 23:28:03 -0000 1.8
++++ m_pd.h 22 Feb 2006 05:54:28 -0000
+@@ -10,6 +10,8 @@
+
+ #define PD_MAJOR_VERSION 0
+ #define PD_MINOR_VERSION 39
++#define PD_BUGFIX_VERSION 2
++#define PD_TEST_VERSION ""
+
+ /* 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 */