From c67180156bb011ebe9a0524757052a28a6c62692 Mon Sep 17 00:00:00 2001 From: Hans-Christoph Steiner Date: Mon, 21 Nov 2005 04:39:02 +0000 Subject: Lots of changes, got the first complete(-ish) build with the new extended build system. I left as much of the old functionality in place as possible, definitely were it was being used. But there are some changes that break backwards compatibility, thought they should be noticed by few, and be easy to fix going forward. Some highlights: - centralized patch system (packages/patches with targets patch_pd and unpatch_pd) - easily redirected builds, using INSTALL_PREFIX and all of the *_DEST variables. This makes building packages like Pd.app, .deb, .rpm, etc. much easier. - libdir format: basically a libdir is a directory that has both the objects and the help files together in one folder. It can be added using -lib or the StartUp preferences, or you can access them via geiger namespaces, i.e. [mylibrary/myobject]. - special characters allow in setup function/file names for objects. This makes objects like [||~] possible without having to be in a library. Now they can be either .pd files or individual .pd_darwin files (thanks IOhannes for the patch). svn path=/trunk/; revision=3993 --- doc/Makefile | 146 +++-- doc/Makefile.buildlayout | 191 +++++++ doc/TODO | 4 + packages/Makefile | 322 ++++++++++- packages/Makefile.buildlayout | 7 +- packages/README | 15 + packages/TODO | 43 +- packages/darwin_app/Makefile | 593 +++++++-------------- packages/darwin_app/TODO | 54 +- .../darwin_app/patches/MACOSX-to-__APPLE__.patch | 357 ------------- .../darwin_app/patches/darwin_linking_fixes.patch | 149 ------ packages/darwin_app/patches/display_tweaks.patch | 33 -- .../darwin_app/patches/extended-help-menu.patch | 174 ------ .../darwin_app/patches/special_chars_hack.patch | 58 -- packages/darwin_app/patches/weak_linking.patch | 22 - packages/patches/build_vars_4_makefile.in.patch | 98 ++++ .../patches/darwin/darwin_display_tweaks.patch | 33 ++ .../patches/darwin/darwin_jack_weak_linking.patch | 22 + packages/patches/darwin/darwin_linking_fixes.patch | 149 ++++++ packages/patches/extended-help-menu.patch | 174 ++++++ packages/patches/libdir-0.38-4.patch | 14 +- packages/patches/loaderHEX-0.39-1.patch | 208 ++++++++ packages/patches/win/NT2_MSC_VER.patch | 59 ++ packages/win32_inno/TODO | 2 +- 24 files changed, 1627 insertions(+), 1300 deletions(-) create mode 100644 doc/Makefile.buildlayout create mode 100644 doc/TODO delete mode 100644 packages/darwin_app/patches/MACOSX-to-__APPLE__.patch delete mode 100644 packages/darwin_app/patches/darwin_linking_fixes.patch delete mode 100644 packages/darwin_app/patches/display_tweaks.patch delete mode 100644 packages/darwin_app/patches/extended-help-menu.patch delete mode 100644 packages/darwin_app/patches/special_chars_hack.patch delete mode 100644 packages/darwin_app/patches/weak_linking.patch create mode 100644 packages/patches/build_vars_4_makefile.in.patch create mode 100644 packages/patches/darwin/darwin_display_tweaks.patch create mode 100644 packages/patches/darwin/darwin_jack_weak_linking.patch create mode 100644 packages/patches/darwin/darwin_linking_fixes.patch create mode 100644 packages/patches/extended-help-menu.patch create mode 100644 packages/patches/loaderHEX-0.39-1.patch create mode 100644 packages/patches/win/NT2_MSC_VER.patch diff --git a/doc/Makefile b/doc/Makefile index 1a4f9811..806ed52d 100644 --- a/doc/Makefile +++ b/doc/Makefile @@ -1,42 +1,104 @@ -# Created by Hans-Christoph Steiner to generate MacOS X packages -# This Makefile does not generate a PDDP pkg, PDDP has its own Makefile - -current: darwin_pkg - -PACKAGE_VERSION = $(shell date +20%y.%m.%d) -PACKAGE_PREFIX = pd-doc -PACKAGE_NAME = $(PACKAGE_PREFIX)-$(PACKAGE_VERSION) - -darwin_pkg_license: - # generate HTML version of License -# echo "" > License.html -# cat ../../creb/COPYING | sed -e 's/^$$/\/g' >> License.html -# echo "" >> License.html - -darwin_pkg_welcome: -# generate Welcome.html from ../README.txt - -darwin_pkg_clean: - -sudo rm -Rf installroot/ $(PACKAGE_PREFIX)*.pkg/ - -rm -f $(PACKAGE_PREFIX)-*.info 1 License.html Welcome.???* - -# install into MSP's default: /usr/local/lib - -darwin_pkg: darwin_pkg_clean darwin_pkg_license darwin_pkg_welcome -# set up installroot dir - -chmod a-x */*/*.pd */*/*/*.pd */*/*/*/*.pd - test -d installroot/pd/doc/7.stuff || mkdir -p installroot/pd/doc/7.stuff - cp -R tutorials installroot/pd/doc/ - cp -R additional/pd-msg installroot/pd/doc/7.stuff/ - cp -f pd-doc.info $(PACKAGE_NAME).info -# delete cruft - -find installroot -name .DS_Store -delete - -sudo rm -Rf installroot/*/*/*/CVS installroot/*/*/*/*/CVS installroot/*/*/*/*/*/CVS - -rm -f 1 -# set proper permissions - sudo chown -R root:staff installroot - package installroot $(PACKAGE_NAME).info -d . -ignoreDSStore -# install pkg docs -# install -m 644 License.html $(PACKAGE_NAME).pkg/Contents/Resources - sudo chown -R root:staff $(PACKAGE_NAME).pkg/Contents/Resources - +#==============================================================================# +# +# Centralized build system for "doc". +# +# see for instructions: http://puredata.org/docs/developer/build +# +# +#==============================================================================# + +CWD := $(shell pwd) + +# these are designed to be overridden by the packages/Makefile +SRC_ROOT_DIR = $(CWD)/.. +INSTALL_PREFIX = build +BUILDLAYOUT_DIR = $(CWD) + +# default target +all: + @echo "this currently does nothing" + +include $(BUILDLAYOUT_DIR)/Makefile.buildlayout + +#==============================================================================# +# +# OVERARCHING BUILD TARGETS +# +#==============================================================================# + +# clean up after everything is installed +final_setup: + chmod -R ugo-w $(DOCS_DEST) + +install: pd-msg_install pddp_install tutorials_install + @echo " " + @echo "doc install succeeded!" + +#==============================================================================# +# +# PROJECT-SPECIFIC TARGETS +# +#==============================================================================# + +#------------------------------------------------------------------------------# +# PD-MSG +PD-MSG_NAME = pd-msg +pd-msg_install: $(MANUALS_DEST) + install -d $(MANUALS_DEST)/$(PD-MSG_NAME) + install -p $(DOC_SRC)/additional/pd-msg/*.txt \ + $(MANUALS_DEST)/$(PD-MSG_NAME) + for dir in $(shell cd $(DOC_SRC)/additional/pd-msg && ls -d [1-5].*); do \ + echo "Including $$dir in $(PD-MSG_NAME)"; \ + install -d $(MANUALS_DEST)/$(PD-MSG_NAME)/$$dir; \ + install -p $(DOC_SRC)/additional/pd-msg/$$dir/*.* \ + $(MANUALS_DEST)/$(PD-MSG_NAME)/$$dir; \ + done + + +#------------------------------------------------------------------------------# +# PDDP +pddp_install: $(HELP_DEST) + install -p $(DOC_SRC)/pddp/*.pd $(HELP_DEST) +# this file is used in key-help.pd + install -p $(DOC_SRC)/pddp/keyboard_fun.txt $(HELP_DEST) + + +#------------------------------------------------------------------------------# +# TUTORIALS +tutorials_install: $(MANUALS_DEST) +# pddrums + install -d $(MANUALS_DEST)/PdDrums + install -p $(DOC_SRC)/tutorials/footils/pddrums/*.* $(MANUALS_DEST)/PdDrums +# playnow + install -d $(MANUALS_DEST)/PlayNow + install -p $(DOC_SRC)/tutorials/playnow/*.pd $(MANUALS_DEST)/PlayNow + install -p $(DOC_SRC)/tutorials/playnow/*.mid $(MANUALS_DEST)/PlayNow + + +#==============================================================================# +# +# DEVELOPER'S TARGETS +# +#==============================================================================# + +# make the symlinks necessary to simulate the installed environment +devsymlinks: + ln -s $(PD_SRC)/doc/2.control.examples $(DOC_SRC)/2.control.examples + ln -s $(PD_SRC)/doc/3.audio.examples $(DOC_SRC)/3.audio.examples +# pd <= 0.38-4 has 4.fft.examples + ln -s $(PD_SRC)/doc/4.fft.examples $(DOC_SRC)/4.fft.examples +# pd > 0.38-4 has 4.data.structures + ln -s $(PD_SRC)/doc/4.data.structures $(DOC_SRC)/4.data.structures + ln -s $(PD_SRC)/doc/7.stuff $(DOC_SRC)/7.stuff + ln -s $(PD_SRC)/doc/sound $(DOC_SRC)/sound + +#==============================================================================# +# +# CLEAN TARGETS +# +#==============================================================================# + +# the destination-specific clean targets are in Makefile.buildlayout +clean: install_clean + +distclean: clean cruft_clean diff --git a/doc/Makefile.buildlayout b/doc/Makefile.buildlayout new file mode 100644 index 00000000..d5b9e9f3 --- /dev/null +++ b/doc/Makefile.buildlayout @@ -0,0 +1,191 @@ +#==============================================================================# +# +# Centralized cross-platform build system Makefile.buildsystem +# +# this file contains all the common locations and targets +# +# +#==============================================================================# +# This file should be exactly the same in each section of the CVS. A copy is +# kept in each section of the CVS so that each section will be self-contained. +# To use it, you need to include it in your Makefile (i.e. "include +# Makefile.buildlayout") and then define $(INSTALL_PREFIX) and $(SRC_ROOT_DIR). +# +# $(SRC_ROOT_DIR) is the base directory of src tree, equivalent to the root +# level of the pure-data CVS. +# +# $(INSTALL_PREFIX) is the base directory to where all of the resulting files +# will be copied. +# +# This file is currently located in these places: +# abstractions +# externals/build +# packages +# +# it will be going here too: +# doc +# extensions +# gem +# pd +# +# + +#==============================================================================# +# +## PLATFORM-SPECIFIC SETTINGS +# +#==============================================================================# +# which OS to compile for +UNAME := $(shell uname -s) +ifeq ($(UNAME),Linux) + OS_NAME = linux + EXTENSION = pd_linux +else + ifeq ($(UNAME),Darwin) + OS_NAME = darwin + EXTENSION = pd_darwin + else + ifeq (MINGW,$(findstring MINGW,$(UNAME))) + OS_NAME = win + EXTENSION = dll + else + OS_NAME = unknown + EXTENSION = so + $(warning WARNING: unknown environment "$(UNAME)".) + endif + endif +endif + + +#==============================================================================# +# +# DIRECTORY STRUCTURE +# +#==============================================================================# + +# sources +ABSTRACTIONS_SRC = $(SRC_ROOT_DIR)/abstractions +DOC_SRC = $(SRC_ROOT_DIR)/doc +EXTERNALS_SRC = $(SRC_ROOT_DIR)/externals +FLEXT_SRC = $(SRC_ROOT_DIR)/externals/grill/flext +GEM_SRC = $(SRC_ROOT_DIR)/Gem +GEMLIBS_SRC = $(SRC_ROOT_DIR)/GemLibs +PACKAGES_SRC = $(SRC_ROOT_DIR)/packages +PD_SRC = $(SRC_ROOT_DIR)/pd +SCRIPTS_SRC = $(SRC_ROOT_DIR)/scripts + + +# destinations +APPLICATIONS_DEST = $(DOCS_DEST)/examples +BIN_DEST = $(INSTALL_PREFIX)/bin +DOCS_DEST = $(INSTALL_PREFIX)/doc +INCLUDE_DEST = $(INSTALL_PREFIX)/include +LIB_DEST = $(INSTALL_PREFIX)/lib +MAN_DEST = $(INSTALL_PREFIX)/man +OBJECTS_DEST = $(INSTALL_PREFIX)/extra +HELP_DEST = $(DOCS_DEST)/5.reference +MANUALS_DEST = $(DOCS_DEST)/manuals + + +#==============================================================================# +# +# DIRECTORY STRUCTURE TARGETS +# +#==============================================================================# + +# first make sure that the directory structure is setup +$(INSTALL_PREFIX): + install -d $(INSTALL_PREFIX) + +$(APPLICATIONS_DEST): $(INSTALL_PREFIX) + install -d $(APPLICATIONS_DEST) + +$(DOCS_DEST): $(INSTALL_PREFIX) + install -d $(DOCS_DEST) + +$(HELP_DEST): $(INSTALL_PREFIX) + install -d $(HELP_DEST) + +$(MANUALS_DEST): $(INSTALL_PREFIX) + install -d $(MANUALS_DEST) + +$(OBJECTS_DEST): $(INSTALL_PREFIX) + install -d $(OBJECTS_DEST) + + +#==============================================================================# +# +# CLEAN TARGETS +# +#==============================================================================# + +applications_clean: + -rm -f -- $(APPLICATIONS_DEST)/*/*/*/*/*.* + -rm -f -- $(APPLICATIONS_DEST)/*/*/*/*.* + -rm -f -- $(APPLICATIONS_DEST)/*/*/*.* + -rm -f -- $(APPLICATIONS_DEST)/*/*.* + -rmdir $(APPLICATIONS_DEST)/*/*/*/* + -rmdir $(APPLICATIONS_DEST)/*/*/* + -rmdir $(APPLICATIONS_DEST)/*/* + -rmdir $(APPLICATIONS_DEST)/* + -rmdir $(APPLICATIONS_DEST) + + +help_clean: + -rm -f -- $(HELP_DEST)/*/*/*.* + -rm -f -- $(HELP_DEST)/*/*.* + -rm -f -- $(HELP_DEST)/*.* + -rmdir $(HELP_DEST)/*/* + -rmdir $(HELP_DEST)/* + -rmdir $(HELP_DEST) + + +manuals_clean: + -rm -f -- $(MANUALS_DEST)/*/*/*.* + -rm -f -- $(MANUALS_DEST)/*/*.* + -rmdir $(MANUALS_DEST)/*/* + -rmdir $(MANUALS_DEST)/* + -rmdir $(MANUALS_DEST) + + +objects_clean: + -rm $(OBJECTS_DEST)/*/*/*.pd + -rm $(OBJECTS_DEST)/*/*.pd + -rm $(OBJECTS_DEST)/*.pd + -rm $(OBJECTS_DEST)/*/*/*.$(EXTENSION) + -rm $(OBJECTS_DEST)/*/*.$(EXTENSION) + -rm $(OBJECTS_DEST)/*.$(EXTENSION) + -rmdir $(OBJECTS_DEST)/*/* + -rmdir $(OBJECTS_DEST)/* + -rmdir $(OBJECTS_DEST) + + +install_clean: applications_clean help_clean manuals_clean objects_clean + -rmdir $(DOCS_DEST) + -rmdir $(INSTALL_PREFIX) + @echo " " + @echo "Build destination cleaned: $(INSTALL_PREFIX)" + + +cruft_clean: +# emacs litter + -rm -f -- */*/*/*/*.*~ + -rm -f -- */*/*/*.*~ + -rm -f -- */*/*.*~ + -rm -f -- */*.*~ + -rm -f -- *.*~ + -rm -f -- Makefile~ Makefile.buildlayout~ +# sed replace litter + -rm -f -- */*/*/*/*.*.bak + -rm -f -- */*/*/*.*.bak + -rm -f -- */*/*.*.bak + -rm -f -- */*.*.bak + -rm -f -- *.*.bak +# autoconf cache + -rm -rf -- */*/*/*/autom4te.cache + -rm -rf -- */*/*/autom4te.cache + -rm -rf -- */*/autom4te.cache + -rm -rf -- */autom4te.cache + -rm -rf -- autom4te.cache + + diff --git a/doc/TODO b/doc/TODO new file mode 100644 index 00000000..94a60cfc --- /dev/null +++ b/doc/TODO @@ -0,0 +1,4 @@ + +- create Makefile for Pd-extended build system + +- add pd-fileformat doc: http://student-kmt.hku.nl/%7Etjeerd/pd/pd_fileformat.html diff --git a/packages/Makefile b/packages/Makefile index 21d7cb96..72d94f68 100644 --- a/packages/Makefile +++ b/packages/Makefile @@ -2,7 +2,8 @@ # # Centralized cross-platform build system # -# see README for instructions +# see for instructions: http://puredata.org/docs/developer/build +# # #==============================================================================# @@ -14,11 +15,92 @@ BUILDLAYOUT_DIR = $(CWD) # default target -all: abstractions doc externals flext gem pd +all: pd abstractions doc externals +#all: pd abstractions doc externals flext gem @echo "Complete build succeeded!" include $(BUILDLAYOUT_DIR)/Makefile.buildlayout +#==============================================================================# +# +# GET VERSIONS FOR RELEVANT SOFTWARE +# +#==============================================================================# + + +PD_MAJOR_VERSION := $(shell /usr/bin/grep 'Pd version' $(PD_SRC)/src/s_main.c | \ + sed 's/char pd_version\[\] = "Pd version \([0-9]\)\.[0-9]*[. TES]*[0-9]*[0-9extndRC.-]*\\n";/\1/') +PD_MINOR_VERSION := $(shell /usr/bin/grep 'Pd version' $(PD_SRC)/src/s_main.c | \ + sed 's/char pd_version\[\] = "Pd version [0-9]\.\([0-9]*\)[. TES]*\([0-9]*\)[0-9extndRC.-]*\\n";/\1/') +PD_BUGFIX_VERSION := $(shell /usr/bin/grep 'Pd version' $(PD_SRC)/src/s_main.c | \ + sed 's/char pd_version\[\] = "Pd version [0-9]\.[0-9]*[. TES]*\([0-9]*\)[0-9extndRC.-]*\\n";/\1/') +PD_VERSION = $(PD_MAJOR_VERSION).$(PD_MINOR_VERSION)-$(PD_BUGFIX_VERSION) + + +# release version for this distro +PACKAGE_VERSION = extended-RC3 +PACKAGE_NAME = Pd-$(PD_VERSION)-$(PACKAGE_VERSION) +DMG_NAME = $(PACKAGE_NAME) + + +CYCLONE_MAJOR_VERSION := $(shell grep CYCLONE_VERSION \ + $(EXTERNALS_SRC)/miXed/cyclone/build_counter | cut -d ' ' -f 3 | \ + cut -d '"' -f 2) +CYCLONE_RELEASE := $(shell grep CYCLONE_RELEASE \ + $(EXTERNALS_SRC)/miXed/cyclone/build_counter | cut -d ' ' -f 3 | \ + cut -d '"' -f 2) +CYCLONE_BUILD := $(shell grep CYCLONE_BUILD \ + $(EXTERNALS_SRC)/miXed/cyclone/build_counter | cut -d ' ' -f 3 | \ + cut -d '"' -f 2) +CYCLONE_VERSION := $(CYCLONE_MAJOR_VERSION) $(CYCLONE_RELEASE) $(CYCLONE_BUILD) + + +FLEXT_MAJOR_VERSION := $(shell grep FLEXTMAJOR \ + $(EXTERNALS_SRC)/grill/flext/buildsys/version.inc | cut -d '=' -f2) +FLEXT_MINOR_VERSION := $(shell grep FLEXTMINOR \ + $(EXTERNALS_SRC)/grill/flext/buildsys/version.inc | cut -d '=' -f2) +FLEXT_MICRO_VERSION := $(shell grep FLEXTMICRO \ + $(EXTERNALS_SRC)/grill/flext/buildsys/version.inc | cut -d '=' -f2) +FLEXT_VERSION := $(FLEXT_MAJOR_VERSION).$(FLEXT_MINOR_VERSION).$(FLEXT_MICRO_VERSION) + + +GEM_VERSION := $(shell grep "GEM_VERSION" $(GEM_SRC)/src/Base/GemVersion.h | \ + cut -d '"' -f 2) + + +MAXLIB_VERSION := $(shell grep "define VERSION" \ + $(EXTERNALS_SRC)/maxlib/maxlib.c | cut -d '"' -f 2) + + +OSC_VERSION := $(shell grep "define VERSION" $(EXTERNALS_SRC)/OSCx/src/OSC.c | \ + cut -d '"' -f 2) + + +PDP_VERSION := $(shell grep PDP_VERSION= $(EXTERNALS_SRC)/pdp/configure | \ + cut -d '=' -f 2) + + +PMPD_VERSION := $(shell grep "define VERSION" \ + $(EXTERNALS_SRC)/pmpd/src/pmpd.c | cut -d '"' -f 2) + + +TOXY_MAJOR_VERSION := $(shell grep TOXY_VERSION \ + $(EXTERNALS_SRC)/miXed/toxy/build_counter | cut -d ' ' -f 3 | \ + cut -d '"' -f 2) +TOXY_RELEASE := $(shell grep TOXY_RELEASE \ + $(EXTERNALS_SRC)/miXed/toxy/build_counter | cut -d ' ' -f 3 | \ + cut -d '"' -f 2) +TOXY_BUILD := $(shell grep TOXY_BUILD \ + $(EXTERNALS_SRC)/miXed/toxy/build_counter | cut -d ' ' -f 3 | \ + cut -d '"' -f 2) +TOXY_VERSION := $(TOXY_MAJOR_VERSION) $(TOXY_RELEASE) $(TOXY_BUILD) + + +ZEXY_VERSION := $(shell grep VERSION $(EXTERNALS_SRC)/zexy/src/zexy.h | \ + grep -v _VERSION | cut -d ' ' -f 3 | cut -d '"' -f 2) + + + # these are sent to all of the various Makefiles so that they all copy their # output to the same directory tree DEST_PATHS = BUILDLAYOUT_DIR=$(BUILDLAYOUT_DIR) \ @@ -26,6 +108,7 @@ DEST_PATHS = BUILDLAYOUT_DIR=$(BUILDLAYOUT_DIR) \ INSTALL_PREFIX=$(INSTALL_PREFIX) \ UNAME=$(UNAME) + #==============================================================================# # # BUILD TARGETS @@ -51,7 +134,13 @@ externals: #------------------------------------------------------------------------------ # flext flext: - +# nusmuk + cd $(EXTERNALS_SRC)/nusmuk/msd && $(EXTERNALS_SRC)/grill/flext/build.sh \ + pd gcc + cd $(EXTERNALS_SRC)/nusmuk/msd2D && $(EXTERNALS_SRC)/grill/flext/build.sh \ + pd gcc + cd $(EXTERNALS_SRC)/nusmuk/msd3D && $(EXTERNALS_SRC)/grill/flext/build.sh \ + pd gcc #------------------------------------------------------------------------------ # Gem @@ -60,7 +149,44 @@ gem: #------------------------------------------------------------------------------ # pd +# pd's makefile has some of its own variables that need to be remapped +# this relies on patches/build_vars_4_makefile.in.patch +DESTDIR = "" +ifeq ($(OS_NAME),darwin) + LIBPD_DEST = $(INSTALL_PREFIX) + LIBBIN_DEST = $(BIN_DEST) +else + ifeq ($(OS_NAME),win) + LIBPD_DEST = $(INSTALL_PREFIX) + LIBBIN_DEST = $(BIN_DEST) + else + LIBPD_DEST = $(INSTDIR)/lib/pd + LIBBIN_DEST = $(LIB_DEST)/pd/bin + endif +endif + +PD_DEST_PATHS = $(DEST_PATHS) DESTDIR=$(DESTDIR) \ + LIBPD_DEST=$(LIBPD_DEST) \ + LIBBIN_DEST=$(LIBBIN_DEST) + +PD_CONFIGURE_FLAGS = +PD_EXTRA_FLAGS = + +# Pd sometimes needs a specific autoconf, which is labeled differently on different +# machines +#PD_AUTOCONF := ${shell ( test -x "`which autoconf-2.59`" && echo autoconf-2.59 ) || echo autoconf } +PD_AUTOCONF = autoconf + + pd: + echo "DESTDIR $(DESTDIR) LIBBIN_DEST $(LIBBIN_DEST)" + echo "DEST_PATHS $(DEST_PATHS)" + echo "PD_DEST_PATHS $(PD_DEST_PATHS)" + echo "PD_EXTRA_FLAGS $(PD_EXTRA_FLAGS)" + cd $(PD_SRC)/src/ && $(PD_AUTOCONF) + cd $(PD_SRC)/src && ./configure $(PD_CONFIGURE_FLAGS) && \ + make $(PD_DEST_PATHS) $(PD_EXTRA_FLAGS) + #==============================================================================# # @@ -75,7 +201,8 @@ abstractions_install: #------------------------------------------------------------------------------ # doc -doc_install: +doc_install: + cd $(DOC_SRC) && make $(DEST_PATHS) install #------------------------------------------------------------------------------ @@ -87,6 +214,14 @@ externals_install: #------------------------------------------------------------------------------ # flext_install flext_install: +# nusmuk + cd $(EXTERNALS_SRC)/nusmuk/msd && $(EXTERNALS_SRC)/grill/flext/build.sh \ + pd gcc install + cd $(EXTERNALS_SRC)/nusmuk/msd2D && $(EXTERNALS_SRC)/grill/flext/build.sh \ + pd gcc install + cd $(EXTERNALS_SRC)/nusmuk/msd3D && $(EXTERNALS_SRC)/grill/flext/build.sh \ + pd gcc install +#TODO: need to add nusmuk/editor #------------------------------------------------------------------------------ @@ -96,17 +231,182 @@ gem_install: #------------------------------------------------------------------------------ # pd -pd_install: +pd_install: pd + cd $(PD_SRC)/src && \ + make $(PD_DEST_PATHS) $(PD_EXTRA_FLAGS) install #------------------------------------------------------------------------------ # install -install: abstractions_install doc_install externals_install flext_install -install: gem_install pd_install +install: pd_install abstractions_install doc_install externals_install +#install: flext_install gem_install @echo "Complete install succeeded!" + + +#==============================================================================# +# +# GENERATE TEXT FILES FOR PACKAGE +# #==============================================================================# + +LICENSE_FILE = $(INSTALL_PREFIX)/License.html +license: + # generate HTML version of License + touch $(LICENSE_FILE) + echo "" >> "$(LICENSE_FILE)" + echo "

(Parts of this package can be used under the Pd/BSD license)

" >> "$(LICENSE_FILE)" + echo "" >> "$(LICENSE_FILE)" + cat "$(EXTERNALS_SRC)/creb/COPYING" | sed -e 's/^$$/\/g' >> "$(LICENSE_FILE)" + echo "" >> $(LICENSE_FILE) + install -p "$(PD_SRC)/LICENSE.txt" "$(INSTALL_PREFIX)/PD LICENSE.txt" + + + +WELCOME_FILE = $(INSTALL_PREFIX)/Welcome.html +welcome: + touch $(WELCOME_FILE) + echo "

" >> $(WELCOME_FILE) + echo "

" >> $(WELCOME_FILE) + echo "

Version $(PD_VERSION)

" >> $(WELCOME_FILE) + echo "

written by Miller S. Puckette

" >> $(WELCOME_FILE) + echo "" >> $(WELCOME_FILE) + echo "

`grep -A9 ACKNOWLEDG $(PD_SRC)/README.txt`

" >> $(WELCOME_FILE) + echo "
" >> $(WELCOME_FILE) + echo "" >> $(WELCOME_FILE) + + + +README_FILE = $(INSTALL_PREFIX)/ReadMe.html +readme: + echo $(CYCLONE_RELEASE) + -rm $(README_FILE) + touch $(README_FILE) + echo "" >> $(README_FILE) + echo "" >> $(README_FILE) + echo "" >> $(README_FILE) + echo "" >> $(README_FILE) + echo "" >> $(README_FILE) + echo "

Pure Data $(PD_VERSION)-$(PACKAGE_VERSION)

" >> $(README_FILE) + echo "

Pd is a free real-time computer music software package resembling Max. It provides a patchable environment for audio analysis, synthesis, and processing, with a rich set of multimedia capabilities. You can get Pd for Linux, Windows, MacOS X, BSD, or IRIX.

" >> $(README_FILE) + echo "

For more information, go to: http://puredata.org

" >> $(README_FILE) + echo "

Installation

" >> $(README_FILE) + echo "

To install Pd, drag the Pd.app to anywhere in your hard disk.

" >> $(README_FILE) + echo "

To install Gem, pmpd, xsample, dyn~, and vasp support, copy org.puredata.pd.plist to ~/Library/Preferences (~ means your home folder). WARNING: this will overwrite any existing Pd preferences!

" >> $(README_FILE) + echo "

Pure Data CVS Developers

" >> $(README_FILE) +# this may seem whack, but it generates the list of developers from the SourceForge site: + curl 'http://sourceforge.net/project/memberlist.php?group_id=55736' | grep -A2 -e '' | sed 's|\(href="\)|target="w" \1http://sourceforge.net|' >> $(README_FILE) + echo "

" >> $(README_FILE) + echo "

" >> $(README_FILE) + echo "Many others not listed have contributed their time and effort, this is just a list of the current developers in the SourceForge project. But really, every Pd user is a developer and is encouraged to contribute to the CVS repository." >> $(README_FILE) + echo "

" >> $(README_FILE) + echo "

License

" >> $(README_FILE) + echo "

" >> $(README_FILE) + echo "The Pd core is licensed under a BSD license, almost every other part of this package is available under the GNU GPL. A couple packages have BSD-style licenses too." >> $(README_FILE) + echo "

" >> $(README_FILE) + echo "

Included Versions

" >> $(README_FILE) + echo "

These externals are all included from the Pd CVS repository:

" >> $(README_FILE) + echo "
    " >> $(README_FILE) + echo "
  • pure data: $(PD_VERSION) " >> $(README_FILE) + echo "
  • cyclone: $(CYCLONE_VERSION)" >> $(README_FILE) + echo "
  • flext: $(FLEXT_VERSION)" >> $(README_FILE) + echo "
  • gem: $(GEM_VERSION)" >> $(README_FILE) + echo "
  • iemlib: `date +20%y.%m.%d`" >> $(README_FILE) +# +# these cause this error: +# Makefile:308: *** unterminated call to function `shell': missing `)'. Stop. +# + echo "
  • maxlib: $(MAXLIB_VERSION)" >> $(README_FILE) + echo "
  • osc: $(OSC_VERSION)" >> $(README_FILE) + echo "
  • pmpd: $(PMPD_VERSION)" >> $(README_FILE) + echo "
  • pd-abstractions: `date +20%y.%m.%d`" >> $(README_FILE) + echo "
  • pd-doc: `date +20%y.%m.%d`" >> $(README_FILE) + echo "
  • pd-externals: `date +20%y.%m.%d`" >> $(README_FILE) + echo "
  • pddp: `date +20%y.%m.%d`" >> $(README_FILE) + echo "
  • pdp: $(PDP_VERSION)" >> $(README_FILE) + echo "
  • toxy: $(TOXY_VERSION)" >> $(README_FILE) + echo "
  • unauthorized: `date +20%y.%m.%d`" >> $(README_FILE) + echo "
  • zexy: $(ZEXY_VERSION)" >> $(README_FILE) + echo "
" >> $(README_FILE) + echo "(this package was built on `date`)
" >> $(README_FILE) + echo "" >> $(README_FILE) + + + +#==============================================================================# +# +## FINAL ASSEMBLY +# +#==============================================================================# + + +#---------------------------------------------------------------------------- +# DOC_FORMAT +doc_format: +# clean out cruft files + -find $(INSTALL_PREFIX) -name .DS_Store -delete + -find $(INSTALL_PREFIX) -name '*.*.bak' -delete +# run script to move help-*.pd files to *-help.pd according to the standard + cd $(DOCS_DEST) && \ + $(SCRIPTS_SRC)/convert-help-to-standard.sh +#---------------------------------------------------------------------------- +# remove write perms to prevent people form editing the helpfiles by mistake + cd $(DOCS_DEST) && chmod a-wx */*.pd */*/*.pd + cd $(DOCS_DEST) && chmod a-w ????*/*.* *.txt + + + +#==============================================================================# +# +# DEVELOPER TARGETS +# +#==============================================================================# + +devsymlinks: + + + +patch_pd: +# change Pd's version number to reflect the extended build + sed -i.bak 's/\(pd_version\[\] = "Pd version \)[0-9extndRC.-]*/\1$(PD_VERSION)-$(PACKAGE_VERSION)/' $(PD_SRC)/src/s_main.c +# apply all platform-neutral patches + for patch in $(wildcard $(CWD)/patches/*.patch); do \ + echo "Applying $$patch"; \ + cd $(PD_SRC)/src/ && patch -p0 < $$patch; \ + done +# apply all platform-specific patches + for patch in $(wildcard $(CWD)/patches/$(OS_NAME)/*.patch); do \ + echo "Applying $$patch"; \ + cd $(PD_SRC)/src/ && patch -p0 < $$patch; \ + done + -rm -f -- $(PD_SRC)/src/configure $(PD_SRC)/src/makefile + @echo " " + @echo "patching succeeded!" + +unpatch_pd: +# this sed pattern won't work with TEST versions + cd $(PD_SRC)/src && \ + sed -i.bak 's/\(pd_version\[\] = "Pd version [0-9.]*\)[0-9extndRC.-]*/\1/' \ + s_main.c +# apply all platform-neutral patches + for patch in $(wildcard $(CWD)/patches/*.patch); do \ + echo "Applying $$patch"; \ + cd $(PD_SRC)/src/ && patch -p0 -R < $$patch; \ + done +# apply all platform-specific patches + for patch in $(wildcard $(CWD)/patches/$(OS_NAME)/*.patch); do \ + echo "Applying $$patch"; \ + cd $(PD_SRC)/src/ && patch -p0 -R < $$patch; \ + done + -rm -f -- $(PD_SRC)/src/configure $(PD_SRC)/src/makefile + @echo " " + @echo "unpatching succeeded!" + + +#==============================================================================# +# # CLEAN TARGETS +# #==============================================================================# abstractions_clean: -cd $(ABSTRACTIONS_SRC) && make $(DEST_PATHS) clean @@ -126,9 +426,13 @@ gem_clean: pd_clean: + -cd $(PD_SRC) && make $(PD_DEST_PATHS) clean + -# these targets are all from Makefile.buildlayout: -# install_clean cruft_clean +# these targets are all from Makefile.buildlayout: install_clean cruft_clean clean: abstractions_clean doc_clean externals_clean flext_clean clean: gem_clean pd_clean echo "Complete clean finished." + + +distclean: clean cruft_clean diff --git a/packages/Makefile.buildlayout b/packages/Makefile.buildlayout index a5a85e6d..d5b9e9f3 100644 --- a/packages/Makefile.buildlayout +++ b/packages/Makefile.buildlayout @@ -70,13 +70,18 @@ EXTERNALS_SRC = $(SRC_ROOT_DIR)/externals FLEXT_SRC = $(SRC_ROOT_DIR)/externals/grill/flext GEM_SRC = $(SRC_ROOT_DIR)/Gem GEMLIBS_SRC = $(SRC_ROOT_DIR)/GemLibs +PACKAGES_SRC = $(SRC_ROOT_DIR)/packages PD_SRC = $(SRC_ROOT_DIR)/pd SCRIPTS_SRC = $(SRC_ROOT_DIR)/scripts # destinations APPLICATIONS_DEST = $(DOCS_DEST)/examples +BIN_DEST = $(INSTALL_PREFIX)/bin DOCS_DEST = $(INSTALL_PREFIX)/doc +INCLUDE_DEST = $(INSTALL_PREFIX)/include +LIB_DEST = $(INSTALL_PREFIX)/lib +MAN_DEST = $(INSTALL_PREFIX)/man OBJECTS_DEST = $(INSTALL_PREFIX)/extra HELP_DEST = $(DOCS_DEST)/5.reference MANUALS_DEST = $(DOCS_DEST)/manuals @@ -146,7 +151,7 @@ manuals_clean: objects_clean: -rm $(OBJECTS_DEST)/*/*/*.pd -rm $(OBJECTS_DEST)/*/*.pd - -rm $(OBJECTS_DEST)/*.pd + -rm $(OBJECTS_DEST)/*.pd -rm $(OBJECTS_DEST)/*/*/*.$(EXTENSION) -rm $(OBJECTS_DEST)/*/*.$(EXTENSION) -rm $(OBJECTS_DEST)/*.$(EXTENSION) diff --git a/packages/README b/packages/README index b256937c..e4f6c159 100644 --- a/packages/README +++ b/packages/README @@ -1,4 +1,19 @@ +Pd-extended build system +======================== + +Check out this webpage for full documentation: + + http://puredata.org/docs/developer/build + +While you are there, check out the rest of them: + + http://puredata.org/docs/developer/ + + +Adding specific package types +============================= + This directory is for package builders for various platforms. The directories here should be named using the following format: diff --git a/packages/TODO b/packages/TODO index 45d83e5d..7525eefc 100644 --- a/packages/TODO +++ b/packages/TODO @@ -1,12 +1,26 @@ -- make abstraction -lib loader. when a -lib mylibrary name is tried and fails - in the path, then fails with IO's altname, then try to load as a path on top - of extra: i.e. extra/mylibrary. If found, add to path, and add - doc/5.reference/mylibrary to helppath. +- global versioning system + the package releases should have versions of there own which apply to + all packages, regardless of format or OS. This will make for easy and + seemless cross-platform work. + +- global optimization flags + ideally, you would use a version of Pd that is fully optimized for your + CPU. In order to do this, a system of optimization flags needs to be + developed so that you can specific the target CPU in one place and have + everything compile for that CPU. + +- libdir + + - document libdir format + + - write .sh script that generates the mylibrary/mylibrary.pd file with the + meta data. It should take command line arguments, and put them into the + meta file. - - call it sys_load_lib_folder();, +- rename "applications" to "examples" - - insert it after if (!sys_load_lib()) in s_main.c +- downcase *_DEST and *_SRC to be more readable - make pd section since I can't easily modify the pd tree @@ -18,24 +32,11 @@ - merge in tigital's Makefile++ -- move purepd to abstractions - - add GRIPD for Anders - add reg keys for Martin Dupras - mDNS objects! -- import nqpoly4 and write helpfiles based on website: - http://pix.test.at/pd/nqpoly/nqpoly4.html - -- global versioning system - the package releases should have versions of there own which apply to - all packages, regardless of format or OS. This will make for easy and - seemless cross-platform work. - -- global optimization flags - ideally, you would use a version of Pd that is fully optimized for your - CPU. In order to do this, a system of optimization flags needs to be - developed so that you can specific the target CPU in one place and have - everything compile for that CPU. +- make standard targets: distclean (*~, etc.), installdirs (make just the + dirs), uninstall instead of install_clean diff --git a/packages/darwin_app/Makefile b/packages/darwin_app/Makefile index b105d67d..84b74424 100644 --- a/packages/darwin_app/Makefile +++ b/packages/darwin_app/Makefile @@ -1,158 +1,53 @@ current: darwin_app -# Pd needs autoconf 2.59, which is labeled differently on different machines -PD_AUTOCONF := ${shell ( test -x "`which autoconf-2.59`" && echo autoconf-2.59 ) || echo autoconf } - # needed to support weak linking of frameworks -MAKE=MACOSX_DEPLOYMENT_TARGET=10.2 make +MAKE=MACOSX_DEPLOYMENT_TARGET=10.3 make CWD := $(shell pwd) -DESTDIR = $(CWD)/build +BUILD_BASE = $(CWD)/build PD_APP_NAME = Pd -PD_APP_CONTENTS = $(DESTDIR)/$(PD_APP_NAME).app/Contents +PD_APP_CONTENTS = $(BUILD_BASE)/$(PD_APP_NAME).app/Contents INSTALL_PREFIX = $(PD_APP_CONTENTS)/Resources +SRC_ROOT_DIR = $(CWD)/../.. +BUILDLAYOUT_DIR = $(PACKAGES_SRC) # source for the Wish Shell.app used to build Pd # download TclTkAquaStandalone-8.?.*.dmg from http://tcltkaqua.sourceforge.net/ # and mount it. The files will be copied from the mounted .dmg image. -#WISH_SHELL = /Applications/Utilities/Wish\ Shell.app +#WISH = /Applications/Utilities/Wish\ Shell.app TCLTK := $(shell /bin/ls -1r TclTkAquaStandalone-8.?.*.dmg|head -1|sed 's/\.dmg//') -WISH_SHELL = /Volumes/$(TCLTK)/Wish\ Shell.app -WISH_SHELL_CONTENTS = $(WISH_SHELL)/Contents +WISH_NAME = Wish\ Shell +WISH = /Volumes/$(TCLTK)/$(WISH_NAME).app +WISH_CONTENTS = $(WISH)/Contents # locations of the various directories from CVS SRC_ROOT_DIR = $(CWD)/../.. -ABSTRACTIONS_SRC = $(SRC_ROOT_DIR)/abstractions -DOC_SRC = $(SRC_ROOT_DIR)/doc -EXTERNALS_SRC = $(SRC_ROOT_DIR)/externals -GEM_SRC = $(SRC_ROOT_DIR)/Gem -GEMLIBS_SRC = $(SRC_ROOT_DIR)/GemLibs -PD_SRC = $(SRC_ROOT_DIR)/pd -SCRIPTS_SRC = $(SRC_ROOT_DIR)/scripts - - -# final destinations for compiled files -ABSTRACTIONS_DST = $(INSTALL_PREFIX)/doc/abstractions -EXTERNALS_DST = $(INSTALL_PREFIX)/extra -DOC_DST = $(INSTALL_PREFIX)/doc - - -PD_MAJOR_VERSION := $(shell /usr/bin/grep 'Pd version' $(PD_SRC)/src/s_main.c | sed 's/char pd_version\[\] = "Pd version \([0-9]\)\.[0-9]*[. TES]*[0-9]*[0-9extndRC.-]*\\n";/\1/') -PD_MINOR_VERSION := $(shell /usr/bin/grep 'Pd version' $(PD_SRC)/src/s_main.c | sed 's/char pd_version\[\] = "Pd version [0-9]\.\([0-9]*\)[. TES]*\([0-9]*\)[0-9extndRC.-]*\\n";/\1/') -PD_BUGFIX_VERSION := $(shell /usr/bin/grep 'Pd version' $(PD_SRC)/src/s_main.c | sed 's/char pd_version\[\] = "Pd version [0-9]\.[0-9]*[. TES]*\([0-9]*\)[0-9extndRC.-]*\\n";/\1/') -PD_VERSION = $(PD_MAJOR_VERSION).$(PD_MINOR_VERSION).$(PD_BUGFIX_VERSION) - - -# release version for this distro -PACKAGE_VERSION = extended-RC2 -PACKAGE_NAME = Pd-$(PD_VERSION)-$(PACKAGE_VERSION) -DMG_NAME = $(PACKAGE_NAME) - - -WELCOME_FILE = Welcome.html -README_FILE = ReadMe.html -LICENSE_FILE = License.html - +include ../Makefile.buildlayout -CYCLONE_MAJOR_VERSION := $(shell grep CYCLONE_VERSION $(EXTERNALS_SRC)/miXed/cyclone/build_counter | cut -d ' ' -f 3 | cut -d '"' -f 2) -CYCLONE_RELEASE := $(shell grep CYCLONE_RELEASE $(EXTERNALS_SRC)/miXed/cyclone/build_counter | cut -d ' ' -f 3 | cut -d '"' -f 2) -CYCLONE_BUILD := $(shell grep CYCLONE_BUILD $(EXTERNALS_SRC)/miXed/cyclone/build_counter | cut -d ' ' -f 3 | cut -d '"' -f 2) -CYCLONE_VERSION := $(CYCLONE_MAJOR_VERSION) $(CYCLONE_RELEASE) $(CYCLONE_BUILD) +# these are sent to all of the various Makefiles so that they all copy their +# output to the same directory tree +DEST_PATHS = BUILDLAYOUT_DIR=$(BUILDLAYOUT_DIR) \ + SRC_ROOT_DIR=$(SRC_ROOT_DIR) \ + INSTALL_PREFIX=$(INSTALL_PREFIX) \ + UNAME=$(UNAME) -FLEXT_VERSION := $(shell grep FLEXTMAJOR $(EXTERNALS_SRC)/grill/flext/buildsys/version.inc | cut -d '=' -f2).$(shell grep FLEXTMINOR $(EXTERNALS_SRC)/grill/flext/buildsys/version.inc | cut -d '=' -f2).$(shell grep FLEXTMICRO $(EXTERNALS_SRC)/grill/flext/buildsys/version.inc | cut -d '=' -f2) +install: darwin_app -GEM_VERSION := $(shell grep "GEM_VERSION" ../../Gem/src/Base/GemVersion.h | cut -d '"' -f 2) - -MAXLIB_VERSION := $(shell grep "define VERSION" $(EXTERNALS_SRC)/maxlib/maxlib.c | cut -d '"' -f 2) - -OSC_VERSION := $(shell grep "define VERSION" $(EXTERNALS_SRC)/OSCx/src/OSC.c | cut -d '"' -f 2) - -PDP_VERSION := $(shell grep PDP_VERSION= $(EXTERNALS_SRC)/pdp/configure | cut -d '=' -f 2) - -PMPD_VERSION := $(shell grep "define VERSION" $(EXTERNALS_SRC)/pmpd/src/pmpd.c | cut -d '"' -f 2) - -TOXY_MAJOR_VERSION := $(shell grep TOXY_VERSION $(EXTERNALS_SRC)/miXed/toxy/build_counter | cut -d ' ' -f 3 | cut -d '"' -f 2) -TOXY_RELEASE := $(shell grep TOXY_RELEASE $(EXTERNALS_SRC)/miXed/toxy/build_counter | cut -d ' ' -f 3 | cut -d '"' -f 2) -TOXY_BUILD := $(shell grep TOXY_BUILD $(EXTERNALS_SRC)/miXed/toxy/build_counter | cut -d ' ' -f 3 | cut -d '"' -f 2) -TOXY_VERSION := $(TOXY_MAJOR_VERSION) $(TOXY_RELEASE) $(TOXY_BUILD) - -ZEXY_VERSION := $(shell grep VERSION $(EXTERNALS_SRC)/zexy/src/zexy.h | cut -d ' ' -f 3 | cut -d '"' -f 2) - - -darwin_app: darwin_app_core darwin_prebuilt_app +#------------------------------------------------------------------------------# +darwin_app: darwin_app_core extended_app_install +#------------------------------------------------------------------------------# # this target is for when you already have a pre-built Pd.app and you # just want to fill it with goodies from CVS. To do so, place your -# Pd.app in $(DESTDIR)/Pd.app -darwin_prebuilt_app: darwin_app_externals darwin_app_docs \ - darwin_app_abstractions darwin_app_noncvs darwin_app_doc_format - -darwin_app_license: - # generate HTML version of License - echo "" > $(LICENSE_FILE) - echo "

(Parts of this package can be used under the Pd/BSD license)

" >> $(LICENSE_FILE) - echo "" >> $(LICENSE_FILE) - cat $(EXTERNALS_SRC)/creb/COPYING | sed -e 's/^$$/\/g' >> $(LICENSE_FILE) - echo "" >> $(LICENSE_FILE) - - -darwin_app_readme: - echo $(CYCLONE_RELEASE) - -rm $(README_FILE) - echo "" > $(README_FILE) - echo "" >> $(README_FILE) - echo "" >> $(README_FILE) - echo "" >> $(README_FILE) - echo "" >> $(README_FILE) - echo "

Pure Data $(PD_VERSION)-$(PACKAGE_VERSION)

" >> $(README_FILE) - echo "

Pd is a free real-time computer music software package resembling Max. It provides a patchable environment for audio analysis, synthesis, and processing, with a rich set of multimedia capabilities. You can get Pd for Linux, Windows, MacOS X, BSD, or IRIX.

" >> $(README_FILE) - echo "

For more information, go to: http://puredata.org

" >> $(README_FILE) - echo "

Installation

" >> $(README_FILE) - echo "

To install Pd, drag the Pd.app to anywhere in your hard disk.

" >> $(README_FILE) - echo "

To install Gem and pmpd support, copy org.puredata.pd.plist to ~/Library/Preferences (~ means your home folder).

" >> $(README_FILE) - echo "

Pure Data CVS Developers

" >> $(README_FILE) -# this may seem whack, but it generates the list of developers from the SourceForge site: - curl 'http://sourceforge.net/project/memberlist.php?group_id=55736' | grep -e '' | sed -e :a -e 's/<[^>]*>//g;/> $(README_FILE) - echo "

" >> $(README_FILE) - echo "

" >> $(README_FILE) - echo "Many others not listed have contributed their time and effort, this is just a list of the current developers in the SourceForge project. But really, every Pd user is a developer and is encouraged to contribute to the CVS repository." >> $(README_FILE) - echo "

" >> $(README_FILE) - echo "

License

" >> $(README_FILE) - echo "

" >> $(README_FILE) - echo "The Pd core is licensed under a BSD license, almost every other part of this package is available under the GNU GPL. A couple packages have BSD-style licenses too." >> $(README_FILE) - echo "

" >> $(README_FILE) - echo "

Included Versions

" >> $(README_FILE) - echo "

These externals are all included from the Pd CVS repository:

" >> $(README_FILE) - echo "
    " >> $(README_FILE) - echo "
  • pure data: $(PD_VERSION) " >> $(README_FILE) - echo "
  • cyclone: $(CYCLONE_VERSION)" >> $(README_FILE) - echo "
  • flext: $(FLEXT_VERSION)" >> $(README_FILE) - echo "
  • gem: $(GEM_VERSION)" >> $(README_FILE) - echo "
  • iemlib: `date +20%y.%m.%d`" >> $(README_FILE) -# -# these cause this error: -# Makefile:308: *** unterminated call to function `shell': missing `)'. Stop. -# - echo "
  • maxlib: $(MAXLIB_VERSION)" >> $(README_FILE) - echo "
  • osc: $(OSC_VERSION)" >> $(README_FILE) - echo "
  • pmpd: $(PMPD_VERSION)" >> $(README_FILE) - echo "
  • pd-abstractions: `date +20%y.%m.%d`" >> $(README_FILE) - echo "
  • pd-doc: `date +20%y.%m.%d`" >> $(README_FILE) - echo "
  • pd-externals: `date +20%y.%m.%d`" >> $(README_FILE) - echo "
  • pddp: `date +20%y.%m.%d`" >> $(README_FILE) - echo "
  • pdp: $(PDP_VERSION)" >> $(README_FILE) - echo "
  • toxy: $(TOXY_VERSION)" >> $(README_FILE) - echo "
  • unauthorized: `date +20%y.%m.%d`" >> $(README_FILE) - echo "
  • zexy: $(ZEXY_VERSION)" >> $(README_FILE) - echo "
" >> $(README_FILE) - echo "(this package was built on `date`)
" >> $(README_FILE) - echo "" >> $(README_FILE) +# Pd.app in $(BUILD_BASE)/Pd.app +extended_app_install: extended_install darwin_app_noncvs darwin_app_doc_format +#------------------------------------------------------------------------------# # check here for a reference on how to do this: # http://cvs.sourceforge.net/viewcvs.py/tkcvs/tkcvs-proj/PackApp?rev=1.4 darwin_app_wrapper: @@ -161,152 +56,81 @@ darwin_app_wrapper: # note: use the "standalone" Wish shell to make a "standalone" pd app install -d "$(PD_APP_CONTENTS)/MacOS" install -m0755 -p \ - $(WISH_SHELL_CONTENTS)/MacOS/Wish\ Shell \ + $(WISH_CONTENTS)/MacOS/$(WISH_NAME) \ "$(PD_APP_CONTENTS)/MacOS" install -d "$(PD_APP_CONTENTS)/Resources" install -m0644 -p \ - $(WISH_SHELL_CONTENTS)/Resources/Wish\ Shell.rsrc \ + $(WISH_CONTENTS)/Resources/Wish\ Shell.rsrc \ "$(PD_APP_CONTENTS)/Resources" install -d "$(PD_APP_CONTENTS)/Frameworks" - cp -Rp $(WISH_SHELL_CONTENTS)/Frameworks "$(PD_APP_CONTENTS)" + cp -Rp $(WISH_CONTENTS)/Frameworks "$(PD_APP_CONTENTS)" # set up app wrapper install -d "$(PD_APP_CONTENTS)/Resources/Scripts" install -m0644 -p Info.plist "$(PD_APP_CONTENTS)" install -m0644 -p *.icns "$(PD_APP_CONTENTS)/Resources" -# rename the Wish Shell executable to "Pd" +# rename the Wish Shell executable to "pd", the all lowercase is important +# since it needs to match the pd executable in order for the Gem windows to +# get focus properly mv "$(PD_APP_CONTENTS)/MacOS/Wish Shell" \ - "$(PD_APP_CONTENTS)/MacOS/Pd" + "$(PD_APP_CONTENTS)/MacOS/pd" # diskutil eject /Volumes/$(TCLTK) -darwin_patch_pd: - sed -i.bak 's/\(pd_version\[\] = "Pd version \)[0-9extndRC.-]*/\1$(PD_VERSION)-$(PACKAGE_VERSION)/' \ - $(PD_SRC)/src/s_main.c - cd $(PD_SRC)/src/ && patch -p0 < \ - ../../packages/darwin_app/patches/darwin_linking_fixes.patch - cd $(PD_SRC)/src/ && patch -p0 < \ - ../../packages/darwin_app/patches/extended-help-menu.patch - cd $(PD_SRC)/src/ && patch -p0 < \ - ../../packages/darwin_app/patches/display_tweaks.patch - -rm -f -- $(PD_SRC)/src/configure $(PD_SRC)/src/makefile + +#------------------------------------------------------------------------------# darwin_app_core: darwin_app_wrapper -# pd core -# cd $(PD_SRC)/src/ && $(PD_AUTOCONF) && ./configure && $(MAKE) -# or pd core with jack - cd $(PD_SRC)/src/ && $(PD_AUTOCONF) && ./configure --enable-jack && $(MAKE) - cp -Rp -- $(PD_SRC)/bin $(PD_SRC)/doc $(PD_SRC)/extra $(PD_SRC)/man \ - $(INSTALL_PREFIX) -# AppMain.tcl + cd $(PACKAGES_SRC) && \ + make $(DEST_PATHS) PD_CONFIGURE_FLAGS=--enable-jack pd_install +# tigital's Gem window focus black magic: + /Developer/tools/Rez -t APPL mac.r -o $(BIN_DEST)/pd cd "$(PD_APP_CONTENTS)/Resources/Scripts" && \ ln -s ../bin/pd.tk AppMain.tcl +# support for Info Panel Plugins mgmt + cd "$(PD_APP_CONTENTS)" && ln -s Resources/extra Plugins # Headers - install -d -m0755 $(INSTALL_PREFIX)/include - install -m0444 $(PD_SRC)/src/*.h $(INSTALL_PREFIX)/include + install -d $(INSTALL_PREFIX)/include + install $(PD_SRC)/src/*.h $(INSTALL_PREFIX)/include # run script to move help-*.pd files to *-help.pd according to the standard - cd $(DOC_DST)/5.reference && \ + cd $(DOCS_DEST) && \ $(SCRIPTS_SRC)/convert-help-to-standard.sh darwin_app_doc_format: -#---------------------------------------------------------------------------- -# clean out cruft files - -find $(PD_APP_CONTENTS) -name .DS_Store -delete - -rm -Rf `find $(INSTALL_PREFIX) -name CVS` # set the font to 10pt on all help patches # the BSD/Darwin version of sed must create a backup file when doing # in-place replacement, so delete the unneeded backup files - cd $(DOC_DST) && \ + cd $(DOCS_DEST) && \ sed -i.bak 's/^\(\#N canvas [0-9]* [0-9]* [0-9]* [0-9]*\) 12/\1 10/' \ - */*.pd */*/*.pd && \ - rm -f -- */*.pd.bak -# run script to move help-*.pd files to *-help.pd according to the standard - cd $(DOC_DST)/5.reference && \ - $(SCRIPTS_SRC)/convert-help-to-standard.sh -#---------------------------------------------------------------------------- -# remove write perms to prevent people form editing the helpfiles by mistake - cd $(DOC_DST) && chmod a-wx */*.pd */*/*.pd - cd $(DOC_DST)/5.reference && chmod a-w ????*/*.* *.txt - - -darwin_app_docs: -#---------------------------------------------------------------------------- -# externals help patches - install -d $(DOC_DST)/5.reference - cd $(EXTERNALS_SRC)/build/doc && $(MAKE) - cp -Rp $(EXTERNALS_SRC)/build/doc/* $(DOC_DST)/5.reference -#---------------------------------------------------------------------------- -# DOC - install -d $(DOC_DST)/7.stuff - cp -Rp $(DOC_SRC)/tutorials $(DOC_DST) - cp -Rp $(DOC_SRC)/additional/pd-msg $(DOC_DST)/7.stuff/ -#---------------------------------------------------------------------------- -# PDDP - install -m644 --group=staff $(DOC_SRC)/pddp/*.pd $(DOC_DST)/5.reference -#---------------------------------------------------------------------------- -# DOC menus - install -d $(DOC_DST)/menus - cp -p ./doc-menu.pd $(DOC_DST)/menus - ./mkdocs $(DOC_DST)/2.control.examples >! $(DOC_DST)/menus/2.control.examples.pd - ./mkdocs $(DOC_DST)/3.audio.examples >! $(DOC_DST)/menus/3.audio.examples.pd - ./mkdocs $(DOC_DST)/4.fft.examples >! $(DOC_DST)/menus/4.fft.examples.pd - ./mkdocs $(DOC_DST)/5.reference >! $(DOC_DST)/menus/5.reference.pd + */*.pd */*/*.pd */*/*/*.pd +#==============================================================================# +# +## CVS SOURCES +# +#==============================================================================# -darwin_app_abstractions: -#---------------------------------------------------------------------------- -# ABSTRACTIONS - install -d $(ABSTRACTIONS_DST) -# audionerd - cp -Rp $(ABSTRACTIONS_SRC)/audionerd $(ABSTRACTIONS_DST) -# footils - cp -Rp $(ABSTRACTIONS_SRC)/footils $(ABSTRACTIONS_DST) -# keyboardkeys - cp -Rp $(ABSTRACTIONS_SRC)/keyboardkeys $(ABSTRACTIONS_DST) -#---------------------------------------------------------------------------- -# EXTERNALS written in Pd -# RRADical - cp -Rp $(ABSTRACTIONS_SRC)/rradical $(EXTERNALS_DST) - cp -Rp $(ABSTRACTIONS_SRC)/rradical/doc $(DOC_DST)/rradical -# footils - install -p $(ABSTRACTIONS_SRC)/footils/softtakeover/sto-help.pd \ - $(DOC_DST)/5.reference - install -p $(ABSTRACTIONS_SRC)/footils/softtakeover/sto.pd $(EXTERNALS_DST) -# fft_convolution - install -p $(ABSTRACTIONS_SRC)/fft_convolution/*-help.pd \ - $(DOC_DST)/5.reference - install -p -m0644 $(shell ls -1 $(ABSTRACTIONS_SRC)/fft_convolution/*.pd | \ - grep -v '\-help.pd') $(EXTERNALS_DST) -# La-kitchen - install -d $(DOC_DST)/5.reference/La-kitchen - install -p $(ABSTRACTIONS_SRC)/La-kitchen/*-help.pd \ - $(DOC_DST)/5.reference/La-kitchen - install -d $(EXTERNALS_DST)/La-kitchen - install -p -m0644 $(shell ls -1 $(ABSTRACTIONS_SRC)/La-kitchen/*.pd | \ - grep -v '\-help.pd') $(EXTERNALS_DST)/La-kitchen -# nusmuk - install -d $(DOC_DST)/5.reference/nusmuk - install -p $(ABSTRACTIONS_SRC)/nusmuk/*-help.pd \ - $(DOC_DST)/5.reference/nusmuk - install -d $(EXTERNALS_DST)/nusmuk - install -p -m0644 $(shell ls -1 $(ABSTRACTIONS_SRC)/nusmuk/*.pd | \ - grep -v '\-help.pd') $(EXTERNALS_DST)/nusmuk -# timestretch~ - install -p $(ABSTRACTIONS_SRC)/timestretch/*-help.pd \ - $(DOC_DST)/5.reference - install -p -m0644 $(shell ls -1 $(ABSTRACTIONS_SRC)/timestretch/*.pd | \ - grep -v '\-help.pd') $(EXTERNALS_DST) -# vadsr~ - install -p $(ABSTRACTIONS_SRC)/vadsr~/vadsr-test.pd \ - $(DOC_DST)/5.reference/vadsr~-help.pd - install -p $(ABSTRACTIONS_SRC)/vadsr~/vadsr~.pd $(EXTERNALS_DST) +extended_install: + cd $(PACKAGES_SRC) && make $(DEST_PATHS) install +#------------------------------------------------------------------------------# darwin_app_externals: darwin_app_externals_standard darwin_app_externals_c++ darwin_app_externals_flext #darwin_app_externals: darwin_app_externals_standard darwin_app_externals_c++ darwin_app_externals_gem + +#------------------------------------------------------------------------------# +# GEM darwin_app_externals_gem: - cd ../../Gem && pbxbuild + cd $(GEM_SRC)/Gem && xcodebuild + install -p -m0644 $(GEM_SRC)/Gem/help/*.* $(HELP_DEST) + install -d $(DOCS_DEST)/Gem/doc + install -p -m0644 $(GEM_SRC)/Gem/doc/*.* $(DOCS_DEST)/gem + install -d $(DOCS_DEST)/Gem/00.manual + install -p -m0644 $(GEM_SRC)/Gem/manual/*.* $(DOCS_DEST)/gem/00.manual + cp -Rfp $(GEM_SRC)/Gem/examples/*.* $(GEM_SRC)/Gem/examples/data $(DOCS_DEST)/gem + +#------------------------------------------------------------------------------# darwin_app_externals_flext: #---------------------------------------------------------------------------- # FLEXT @@ -315,6 +139,7 @@ darwin_app_externals_flext: cp $(EXTERNALS_SRC)/grill/flext/buildsys/mac/pd/config-gcc.def \ $(EXTERNALS_SRC)/grill/flext/buildsys/config-mac-pd-gcc.txt # end temp hack +# tigital 8/30/2005 added cd $(EXTERNALS_SRC)/grill/flext && \ ( \ test -f buildsys/config-mac-pd-gcc.txt || \ @@ -325,8 +150,18 @@ darwin_app_externals_flext: ) && \ ( \ cat buildsys/config-mac-pd-gcc.txt | \ - sed "s/^PDPATH=.*/PDPATH=..\/..\/..\/pd/" | \ - sed "s/^FLEXTPREFIX=.*/FLEXTPREFIX=@executable_path\/..\/extra/" > buildsys/config-mac-pd-gcc.txt \ + sed "s/^PDPATH=.*/PDPATH=..\/..\/..\/pd/" > buildsys/config-mac-pd-gcc.txt \ + ) && \ + ( \ + cat package.txt | sed "s/^PRECOMPILE=.*/PRECOMPILE=/" > package.txt \ + ) && \ + ( \ + cat buildsys/mac/pd/gnumake-gcc-ext.inc | \ + sed "s/^LDFLAG\S +=.*/LDFLAG\S += -bundle -bundle_loader ..\/..\/..\/pd\/bin\/pd/" > buildsys/mac/pd/gnumake-gcc-ext.inc \ + ) && \ + ( \ + cat buildsys/mac/pd/gnumake-gcc-flext.inc | \ + sed "s/^LDFLAG\S +=.*/LDFLAG\S += -dynamiclib -undefined dynamic_lookup /" > buildsys/mac/pd/gnumake-gcc-flext.inc \ ) && \ ( \ test -f config.txt || \ @@ -335,218 +170,122 @@ darwin_app_externals_flext: echo Copied template flext config file \ ) \ ) && \ - bash build.sh pd gcc build-release-shared - install -p -m0444 $(EXTERNALS_SRC)/grill/flext/pd-darwin/release-shared/libflext-pd.$(FLEXT_VERSION).dylib $(EXTERNALS_DST) - ln -sf libflext-pd.$(FLEXT_VERSION).dylib $(EXTERNALS_DST)/libflext-pd.dylib - install -d $(DOC_DST)/tutorials - cp -rp $(EXTERNALS_SRC)/grill/flext/tutorial $(DOC_DST)/tutorials/flext - install -d $(DOC_DST)/flext + MACOSX_DEPLOYMENT_TARGET=10.3 bash build.sh pd gcc build-release-shared FLEXTLIB=@executable_path/../extra FLEXTINC=../flext/source FLEXTSYS=$(OBJECTS_DEST) + ln -sf $(EXTERNALS_SRC)/grill/flext/pd-darwin/release-shared/libflext-pd.$(FLEXT_VERSION).dylib $(EXTERNALS_SRC)/grill/flext/pd-darwin/release-shared/libflext-pd.dylib + install -p -m0444 $(EXTERNALS_SRC)/grill/flext/pd-darwin/release-shared/libflext-pd.$(FLEXT_VERSION).dylib $(OBJECTS_DEST) + ln -sf libflext-pd.$(FLEXT_VERSION).dylib $(OBJECTS_DEST)/libflext-pd.dylib + install -d $(DOCS_DEST)/tutorials + cp -rp $(EXTERNALS_SRC)/grill/flext/tutorial $(DOCS_DEST)/tutorials/flext + install -d $(DOCS_DEST)/flext install -p -m0644 $(EXTERNALS_SRC)/grill/flext/gpl.txt \ $(EXTERNALS_SRC)/grill/flext/readme.txt \ $(EXTERNALS_SRC)/grill/flext/license.txt \ - $(DOC_DST)/flext + $(DOCS_DEST)/flext # FLEXTERNALS ######### # dyn~ - cd $(EXTERNALS_SRC)/grill/dynext && bash ../flext/build.sh pd gcc build-release-shared FLEXTPREFIX=. FLEXTLIB=$(EXTERNALS_DST) FLEXTINC=../flext/source - install -p -m0444 $(EXTERNALS_SRC)/grill/dynext/pd-darwin/release-shared/*.pd_darwin $(EXTERNALS_DST) - install -p -m0644 $(EXTERNALS_SRC)/grill/dynext/pd/*.pd $(DOC_DST)/5.reference - install -d $(DOC_DST)/dynext - install -p -m0644 $(EXTERNALS_SRC)/grill/dynext/gpl.txt \ + cd $(EXTERNALS_SRC)/grill/dynext && bash ../flext/build.sh pd gcc build-release-shared FLEXTLIB=../flext/pd-darwin/release-shared FLEXTINC=../flext/source FLEXTSYS=$(OBJECTS_DEST) + install -p $(EXTERNALS_SRC)/grill/dynext/pd-darwin/release-shared/*.pd_darwin $(OBJECTS_DEST) + install -p $(EXTERNALS_SRC)/grill/dynext/pd/*.pd $(DOCS_DEST) + install -d $(DOCS_DEST)/dynext + install -p $(EXTERNALS_SRC)/grill/dynext/gpl.txt \ $(EXTERNALS_SRC)/grill/dynext/readme.txt \ $(EXTERNALS_SRC)/grill/dynext/license.txt \ - $(DOC_DST)/dynext + $(DOCS_DEST)/dynext ######### # pool - cd $(EXTERNALS_SRC)/grill/pool && bash ../flext/build.sh pd gcc build-release-shared FLEXTPREFIX=. FLEXTLIB=$(EXTERNALS_DST) FLEXTINC=../flext/source - install -p -m0444 $(EXTERNALS_SRC)/grill/pool/pd-darwin/release-shared/*.pd_darwin $(EXTERNALS_DST) - install -p -m0644 $(EXTERNALS_SRC)/grill/pool/help-pool.pd $(DOC_DST)/5.reference - install -d $(DOC_DST)/pool - install -p -m0644 $(EXTERNALS_SRC)/grill/pool/gpl.txt \ + cd $(EXTERNALS_SRC)/grill/pool && bash ../flext/build.sh pd gcc build-release-shared FLEXTPREFIX=. FLEXTLIB=$(OBJECTS_DEST) FLEXTINC=../flext/source + install -p $(EXTERNALS_SRC)/grill/pool/pd-darwin/release-shared/*.pd_darwin $(OBJECTS_DEST) + install -p $(EXTERNALS_SRC)/grill/pool/help-pool.pd $(DOCS_DEST) + install -d $(DOCS_DEST)/pool + install -p $(EXTERNALS_SRC)/grill/pool/gpl.txt \ $(EXTERNALS_SRC)/grill/pool/readme.txt \ $(EXTERNALS_SRC)/grill/pool/license.txt \ - $(DOC_DST)/pool + $(DOCS_DEST)/pool ######### # py/pyext # cd $(EXTERNALS_SRC)/grill/py && \ # ( \ # cp -f build/config-mac.def config.txt \ # ) && \ -# bash ../flext/build.sh pd gcc build-release-shared FLEXTPREFIX=. FLEXTLIB=$(EXTERNALS_DST) FLEXTINC=../flext/source -# install -p -m0444 $(EXTERNALS_SRC)/grill/py/pd-darwin/release-shared/*.pd_darwin $(EXTERNALS_DST) +# bash ../flext/build.sh pd gcc build-release-shared FLEXTPREFIX=. FLEXTLIB=$(OBJECTS_DEST) FLEXTINC=../flext/source +# install -p -m0444 $(EXTERNALS_SRC)/grill/py/pd-darwin/release-shared/*.pd_darwin $(OBJECTS_DEST) # this wasn't building for me -HCS 2005-06-09 - install -d $(DOC_DST)/py/examples - install -d $(DOC_DST)/py/scripts - install -p -m0644 $(EXTERNALS_SRC)/grill/py/pd/*.pd $(DOC_DST)/py/examples - install -p -m0644 $(EXTERNALS_SRC)/grill/py/scripts/*.py $(DOC_DST)/py/scripts - install -p -m0644 $(EXTERNALS_SRC)/grill/py/gpl.txt \ + install -d $(DOCS_DEST)/py/examples + install -d $(DOCS_DEST)/py/scripts + install -p $(EXTERNALS_SRC)/grill/py/pd/*.pd $(DOCS_DEST)/py/examples + install -p $(EXTERNALS_SRC)/grill/py/scripts/*.py $(DOCS_DEST)/py/scripts + install -p $(EXTERNALS_SRC)/grill/py/gpl.txt \ $(EXTERNALS_SRC)/grill/py/readme.txt $(EXTERNALS_SRC)/grill/py/license.txt \ - $(DOC_DST)/py + $(DOCS_DEST)/py # install -d $(INSTALL_PREFIX)/Library/Frameworks # cp -R /Library/Frameworks/Python.framework $(INSTALL_PREFIX)/Library/Frameworks ######### # vasp # fails without the dir # test -d ../../vasp/pd-darwin || mkdir -p ../../vasp/pd-darwin -# cd $(EXTERNALS_SRC)/grill/vasp/ && bash ../flext/build.sh pd gcc build-release-shared FLEXTPREFIX=. FLEXTLIB=$(EXTERNALS_DST) FLEXTINC=../flext/source -# install -p -m0444 $(EXTERNALS_SRC)/grill/vasp/pd-darwin/release-shared/*.pd_darwin $(EXTERNALS_DST) +# cd $(EXTERNALS_SRC)/grill/vasp/ && bash ../flext/build.sh pd gcc build-release-shared FLEXTPREFIX=. FLEXTLIB=$(OBJECTS_DEST) FLEXTINC=../flext/source +# install -p -m0444 $(EXTERNALS_SRC)/grill/vasp/pd-darwin/release-shared/*.pd_darwin $(OBJECTS_DEST) # this wasn't building for me -HCS 2005-06-09 - install -p -m0644 $(EXTERNALS_SRC)/grill/vasp/pd-help/*.pd $(DOC_DST)/5.reference - install -d $(DOC_DST)/vasp + install -p -m0644 $(EXTERNALS_SRC)/grill/vasp/pd-help/*.pd $(DOCS_DEST) + install -d $(DOCS_DEST)/vasp install -p -m0644 $(EXTERNALS_SRC)/grill/vasp/gpl.txt \ $(EXTERNALS_SRC)/grill/vasp/readme.txt \ $(EXTERNALS_SRC)/grill/vasp/license.txt \ $(EXTERNALS_SRC)/grill/vasp/changes.txt \ $(EXTERNALS_SRC)/grill/vasp/todo.txt \ - $(DOC_DST)/vasp - cp -rp $(EXTERNALS_SRC)/grill/vasp/pd-ex $(DOC_DST)/vasp + $(DOCS_DEST)/vasp + cp -rp $(EXTERNALS_SRC)/grill/vasp/pd-ex $(DOCS_DEST)/vasp ######### # xsample - cd $(EXTERNALS_SRC)/grill/xsample && bash ../flext/build.sh pd gcc build-release-shared FLEXTPREFIX=. FLEXTLIB=$(EXTERNALS_DST) FLEXTINC=../flext/source - install -p -m0444 $(EXTERNALS_SRC)/grill/xsample/pd-darwin/release-shared/*.pd_darwin $(EXTERNALS_DST) - install -p -m0644 $(EXTERNALS_SRC)/grill/xsample/pd/*.pd $(DOC_DST)/5.reference - install -d $(DOC_DST)/xsample + cd $(EXTERNALS_SRC)/grill/xsample && bash ../flext/build.sh pd gcc build-release-shared FLEXTPREFIX=. FLEXTLIB=$(OBJECTS_DEST) FLEXTINC=../flext/source + install -p -m0444 $(EXTERNALS_SRC)/grill/xsample/pd-darwin/release-shared/*.pd_darwin $(OBJECTS_DEST) + install -p -m0644 $(EXTERNALS_SRC)/grill/xsample/pd/*.pd $(DOCS_DEST) + install -d $(DOCS_DEST)/xsample install -p -m0644 $(EXTERNALS_SRC)/grill/xsample/gpl.txt \ $(EXTERNALS_SRC)/grill/xsample/readme.txt \ $(EXTERNALS_SRC)/grill/xsample/license.txt \ - $(DOC_DST)/xsample + $(DOCS_DEST)/xsample ########## FOOTILS ######### # syncgrain # cd $(EXTERNALS_SRC)/footils/syncgrain/ && $(MAKE) -f makefile.pd-darwin # install -p -m0444 $(EXTERNALS_SRC)/footils/syncgrain/pd-darwin/*.pd_darwin \ -# $(EXTERNALS_DST) - install -p -m0644 $(EXTERNALS_SRC)/footils/syncgrain/pd/*.* $(DOC_DST)/5.reference +# $(OBJECTS_DEST) + install -p -m0644 $(EXTERNALS_SRC)/footils/syncgrain/pd/*.* $(DOCS_DEST) -darwin_app_externals_standard: -#---------------------------------------------------------------------------- -# PD-EXTERNALS - -cd $(EXTERNALS_SRC)/build/darwin && $(MAKE) -k - install -d $(EXTERNALS_DST) - install -p -m0644 $(EXTERNALS_SRC)/build/darwin/*.pd_darwin $(EXTERNALS_DST) -# creb - install -d $(EXTERNALS_DST)/creb - install -p -m0644 $(EXTERNALS_SRC)/creb/abs/*.pd $(EXTERNALS_DST)/creb - install -d $(DOC_DST)/5.reference/creb - install -p -m0644 $(EXTERNALS_SRC)/creb/doc/examples/*.* \ - $(DOC_DST)/5.reference/creb -#---------------------------------------------------------------------------- -# GEM - install -p -m0644 ../../Gem/help/*.* $(DOC_DST)/5.reference - install -d $(DOC_DST)/Gem/doc - install -p -m0644 ../../Gem/doc/*.* $(DOC_DST)/gem - install -d $(DOC_DST)/Gem/00.manual - install -p -m0644 ../../Gem/manual/*.* $(DOC_DST)/gem/00.manual - cp -Rfp ../../Gem/examples/*.* ../../Gem/examples/data $(DOC_DST)/gem -#---------------------------------------------------------------------------- -# hcs - install -p -m0644 $(shell ls -1 $(EXTERNALS_SRC)/hcs/*.pd | \ - grep -v '\-help.pd') $(EXTERNALS_DST) -# hid - cd $(EXTERNALS_SRC)/hcs/hid && $(MAKE) - install -p -m0644 $(EXTERNALS_SRC)/hcs/hid/hid.pd_darwin $(EXTERNALS_DST) - install -p -m0644 $(shell ls -1 $(EXTERNALS_SRC)/hcs/hid/*.pd | \ - grep -v '\-help.pd'| grep -v '\-list.pd') $(EXTERNALS_DST) -# general - install -p -m0644 $(EXTERNALS_SRC)/hcs/general/*.pd $(EXTERNALS_DST) -# pan - install -p -m0644 $(shell ls -1 $(EXTERNALS_SRC)/hcs/pan/*.pd | \ - grep -v '\-help.pd') $(EXTERNALS_DST) -#---------------------------------------------------------------------------- -# IEMlib - cp -Rp $(EXTERNALS_SRC)/iemlib/iemabs $(EXTERNALS_DST) - install -d -m0755 $(DOC_DST)/5.reference/iemabs - mv $(EXTERNALS_DST)/iemabs/help-*.pd $(DOC_DST)/5.reference/iemabs -#---------------------------------------------------------------------------- -# miXed - cd $(EXTERNALS_SRC)/miXed/toxy && $(MAKE) - cd $(EXTERNALS_SRC)/miXed/cyclone && $(MAKE) - cd $(EXTERNALS_SRC)/miXed/pddp && $(MAKE) - install -d -m755 $(EXTERNALS_DST) - install -p -m444 $(EXTERNALS_SRC)/miXed/bin/*.pd_darwin $(EXTERNALS_DST) - install -p -m555 $(EXTERNALS_SRC)/miXed/bin/cyclist $(INSTALL_PREFIX)/bin - install -d -m755 $(DOC_DST)/5.reference/cyclone - install -p -m0644 $(EXTERNALS_SRC)/miXed/test/*/*.* \ - $(DOC_DST)/5.reference/cyclone - install -p -m0644 $(EXTERNALS_SRC)/miXed/doc/*/*/*.* \ - $(DOC_DST)/5.reference -#---------------------------------------------------------------------------- -# OSC - cd $(EXTERNALS_SRC)/OSCx && ./configure && $(MAKE) - install -p -m0644 $(EXTERNALS_SRC)/OSCx/doc/*.* $(DOC_DST)/5.reference - install -p -m0444 $(EXTERNALS_SRC)/OSCx/src/*.pd_darwin $(EXTERNALS_DST) -#---------------------------------------------------------------------------- -# PdP -# cd $(EXTERNALS_SRC)/pdp && ./configure && $(MAKE) -# install -p -m0444 $(EXTERNALS_SRC)/pdp/*.pd_darwin $(EXTERNALS_DST) - install -p -m0644 $(EXTERNALS_SRC)/pdp/doc/objects/*.* $(DOC_DST)/5.reference - install -d $(DOC_DST)/pdp/introduction - install -p -m0644 $(EXTERNALS_SRC)/pdp/doc/introduction/*.* $(DOC_DST)/pdp/introduction - install -d $(DOC_DST)/pdp/examples - install -p -m0644 $(EXTERNALS_SRC)/pdp/doc/examples/*.* $(DOC_DST)/pdp/examples - install -p -m0644 $(EXTERNALS_SRC)/pdp/doc/reference.txt $(DOC_DST)/pdp -# libs for PdP -#---------------------------------------------------------------------------- -# unauthorized - cd $(EXTERNALS_SRC)/unauthorized && $(MAKE) - install -p -m0444 $(EXTERNALS_SRC)/unauthorized/*/*.pd_darwin $(EXTERNALS_DST) - install -p -m0644 $(EXTERNALS_SRC)/unauthorized/*/*.pd $(DOC_DST)/5.reference - install -p -m0644 $(EXTERNALS_SRC)/unauthorized/*/*.txt $(DOC_DST)/5.reference - install -p -m0644 $(EXTERNALS_SRC)/unauthorized/*/*.pls $(DOC_DST)/5.reference - cp -Rfp $(EXTERNALS_SRC)/unauthorized/blinkenlights/blm $(DOC_DST)/5.reference -#---------------------------------------------------------------------------- -# zexy -# new build system doesn't work with CVS layout, and most of zexy is -# included in the extrnals build system now anyway -# cd $(EXTERNALS_SRC)/zexy/src && autoconf && ./configure && $(MAKE) - -install -p -m0444 $(EXTERNALS_SRC)/zexy/src/*.pd_darwin $(EXTERNALS_DST) - install -p -m0444 \ - $(shell ls -1 $(EXTERNALS_SRC)/zexy/abs/*.pd | \ - grep -v '-help.pd' | sed 's/\([&<>|~]\)/\\\1/g') \ - $(EXTERNALS_DST) - install -p -m0644 $(EXTERNALS_SRC)/zexy/abs/*-help.pd $(DOC_DST)/5.reference darwin_app_externals_c++: #---------------------------------------------------------------------------- # CREB # cd $(EXTERNALS_SRC)/creb && autoconf && ./configure && cd modules++ && $(MAKE) -# install -p -m0644 $(EXTERNALS_SRC)/creb/modules++/*.pd_darwin $(EXTERNALS_DST) +# install -p -m0644 $(EXTERNALS_SRC)/creb/modules++/*.pd_darwin $(OBJECTS_DEST) #---------------------------------------------------------------------------- # gem2pdp # cd $(EXTERNALS_SRC)/gem2pdp && $(MAKE) -f Makefile.darwin -# install -p -m0444 $(EXTERNALS_SRC)/gem2pdp/*.pd_darwin $(EXTERNALS_DST) +# install -p -m0444 $(EXTERNALS_SRC)/gem2pdp/*.pd_darwin $(OBJECTS_DEST) #---------------------------------------------------------------------------- # GridFlow # cd ../../gridflow && ./configure && $(MAKE) -darwin_app_welcome: - echo "

" > $(WELCOME_FILE) - echo "

" >> $(WELCOME_FILE) - echo "

Version $(PD_VERSION)

" >> $(WELCOME_FILE) - echo "

written by Miller S. Puckette

" >> $(WELCOME_FILE) - echo "" >> $(WELCOME_FILE) - echo "

`grep -A9 ACKNOWLEDG $(PD_SRC)/README.txt`

" >> $(WELCOME_FILE) - echo "
" >> $(WELCOME_FILE) - echo "" >> $(WELCOME_FILE) - darwin_app_noncvs: test -d noncvs/doc/5.reference && \ - install -p -m0644 noncvs/doc/5.reference/*.* $(DOC_DST)/5.reference - test -d noncvs/extra && \ - install -p -m0644 noncvs/extra/*.* $(EXTERNALS_DST) - cp -Rp noncvs/doc/serendipd $(DOC_DST) + install -p noncvs/doc/5.reference/*.* $(HELP_DEST) + test -d noncvs/extra && install -p noncvs/extra/*.* $(OBJECTS_DEST) + test -d noncvs/doc/serendipd && cp -Rp noncvs/doc/serendipd $(DOCS_DEST) darwin_app_perms: - chmod a-x $(DOC_DST)/*/*.pd $(DOC_DST)/*/*/*.pd $(DOC_DST)/*/*/*/*.pd - chmod -R a-w $(DOC_DST) + chmod a-x $(DOCS_DEST)/*/*.pd $(DOCS_DEST)/*/*/*.pd $(DOCS_DEST)/*/*/*/*.pd + chmod -R a-w $(DOCS_DEST) # serendiPd shared patch - chmod a+w $(DOC_DST)/serendipd/*shared_patch.pd + test -d $(DOCS_DEST)/serendipd && \ + chmod a+w $(DOCS_DEST)/serendipd/*shared_patch.pd dmg: darwin_app_readme darwin_app_welcome darwin_app_license darwin_app_perms install -d "$(CWD)/$(DMG_NAME)" - cd $(DESTDIR) && mv $(PD_APP_NAME).app "$(CWD)/$(DMG_NAME)/$(DMG_NAME).app" + cd $(BUILD_BASE) && mv $(PD_APP_NAME).app "$(CWD)/$(DMG_NAME)/$(DMG_NAME).app" install -p -m0444 $(PD_SRC)/LICENSE.txt "$(CWD)/$(DMG_NAME)/PD LICENSE.txt" install -p -m0444 $(LICENSE_FILE) $(README_FILE) \ $(WELCOME_FILE) $(LICENSE_FILE) "$(CWD)/$(DMG_NAME)" @@ -560,35 +299,75 @@ darwin_pd_clean: cd $(PD_SRC)/src/ && make clean darwin_app_clean: - -sudo rm -Rf -- $(DESTDIR) "$(DMG_NAME)" + -sudo rm -Rf -- $(BUILD_BASE) "$(DMG_NAME)" -rm -f -- *~ 1 $(README_FILE) $(WELCOME_FILE) $(LICENSE_FILE) \ $(UNIX_PACKAGE_NAME).pkg "$(DMG_NAME).dmg" -darwin_unpatch_pd: -# this sed pattern won't work with TEST versions - cd $(PD_SRC)/src && \ - sed -i.bak 's/\(pd_version\[\] = "Pd version [0-9.]*\)[0-9extndRC.-]*/\1/' \ - s_main.c && \ - rm -- *.bak - cd $(PD_SRC)/src/ && patch -R -p0 < \ - ../../packages/darwin_app/patches/darwin_linking_fixes.patch - cd $(PD_SRC)/src/ && patch -R -p0 < \ - ../../packages/darwin_app/patches/extended-help-menu.patch - cd $(PD_SRC)/src/ && patch -R -p0 < \ - ../../packages/darwin_app/patches/display_tweaks.patch - darwin_app_externals_standard_clean: cd $(EXTERNALS_SRC)/build/darwin && make clean - cd $(EXTERNALS_SRC)/build/doc && make clean cd $(EXTERNALS_SRC)/hcs/hid && make clean darwin_app_externals_gem_clean: - cd ../../Gem && pbxbuild clean + cd $(GEM_SRC)/Gem && xcodebuild clean darwin_app_externals_flext_clean: cd $(EXTERNALS_SRC)/footils/syncgrain && make -f makefile.pd-darwin clean - cd $(EXTERNALS_SRC)/grill && \ + -cd $(EXTERNALS_SRC)/grill && \ rm -- flext/buildsys/config-mac-pd-gcc.txt config.txt flext/config.txt \ - flext/source/libflext.a */pd-darwin/*.o */pd-darwin/*.pd_darwin \ - */pd-darwin/*/*.pd_darwin + flext/source/libflext.a */pd-darwin/*.o */pd-darwin/*/*.o \ + */pd-darwin/*/*.pd_darwin */pd-darwin/*.pd_darwin \ + */pd-darwin/release-shared/*.dylib */pd-darwin/release-shared/*.opp + + + +#==============================================================================# +# +## DEPRECATED TARGETS +# +#==============================================================================# + +darwin_app_externals: + @echo " " + @echo "Deprecated!!" + @echo "cd $(EXTERNALS_SRC) && make install" + +darwin_app_externals_standard: + @echo " " + @echo "Deprecated!!" + @echo "cd $(EXTERNALS_SRC) && make install" + +darwin_patch_pd: + @echo " " + @echo "Deprecated!!" + @echo "cd .. && make patch_pd" + +darwin_unpatch_pd: + @echo " " + @echo "Deprecated!!" + @echo "cd .. && make unpatch_pd" + +darwin_app_docs: + @echo " " + @echo "Deprecated!!" + @echo "cd $(DOC_SRC) && make install" + +darwin_app_license: + @echo " " + @echo "Deprecated!!" + @echo "cd .. && make license" + +darwin_app_welcome: + @echo " " + @echo "Deprecated!!" + @echo "cd .. && make welcome" + +darwin_app_readme: + @echo " " + @echo "Deprecated!!" + @echo "cd .. && make readme" + +darwin_prebuilt_app: + @echo " " + @echo "Deprecated!!" + @echo "Use make extended_app_install" diff --git a/packages/darwin_app/TODO b/packages/darwin_app/TODO index 20f9be12..f20961a3 100644 --- a/packages/darwin_app/TODO +++ b/packages/darwin_app/TODO @@ -1,23 +1,35 @@ -- review permissions so that you can build on top on existing builds +- make Pd open a new window when its launched to workaround the bug where the + menus don't work until a window is opened. -- import nqpoly4 and write helpfiles based on website: - http://pix.test.at/pd/nqpoly/nqpoly4.html +- otool dylib help: http://qin.laya.com/tech_coding_help/dylib_linking.html -- add standard paths to included org.puredata.pd.plist following these - guidelines: -http://developer.apple.com/documentation/MacOSX/Conceptual/BPFileSystem/Articles/WhereToPutFiles.html +- add symbolic link for flext + (cd Pd.app/Contents/Resources/extra && ln -s . lib) - explore Pd.app/Contents/Plugins with "Get Info" installation for externals + (just make it a symlink to Resources/extra) + +- from Carmen Rocco about [fiddle~] crash: "is fiddle~: * compiled with the same header * linked with the same binary of (lib)pd * compiled with the same compiler? i had very similar issues with bonk on windows (Virtually same stacktrace but s/fiddle/bonk) until fixing the above 3 things..." + +- test for noncvs locations before copying to prevent show-stopping errors + +- investigate moving pd binary to Contents/MacOS to solve GEM window not + getting focus, i.e. no symlink, make it the real binary location + +- review permissions so that you can build on top on existing builds -- include org.puredata.pd.plist file in the DMG +- add standard paths to included org.puredata.pd.plist following these + guidelines: +http://developer.apple.com/documentation/MacOSX/Conceptual/BPFileSystem/Articles/WhereToPutFiles.html -- add "extended" version to pd/src/s_main.c:char pd_version[] = "Pd version 0.38.4\n"; +- help menu -- create old-style Help->Pure Documentation link on Help menu. It should use a - symlink to the "doc" dir internal to that particular Pd.app. The symlink is - named after the complete path to the "doc" dir, like: - /tmp/.Applications_Pd-0.38-4.app_Contents_Resources_doc + - check up on this bug: Opening Help patches from "Pure Documentation" + + - make help menu function check if item exists before trying to make a + menu item so that it doesn't break pd.tk<->pd interaction (i.e. windows + titled x50bf90). (the recursive function might have fixed this) - try this for the Pref Pane: kAEShowPreferences ::tk::mac::ShowPreferences @@ -34,22 +46,24 @@ http://developer.apple.com/documentation/MacOSX/Conceptual/BPFileSystem/Articles - instead of hiding menus, grey-out/disable menu items on Pd window - one method for creating all menus - Pd window has method which disables menus + - flash menu when accelerator hits + - fix edit mode menu item (make it a checkbox or change to "play mode" -- make Cmd-Delete also delete, as well as just Delete, so that my Finder key - command habits work in Pd as well - -- create general optimization flag system +- redo key mapping system + - make Cmd-Delete also delete, as well as just Delete, so that my + Finder key command habits work in Pd as well + - make Cmd-click work like Ctrl-click - convert from -DMACOSX to -D__APPLE__ where ever possible (check out __gnu_linux__) while I am at it - +- instead of shipping Pd.app with a org.puredata.pd.plist, make a script that + uses the "defaults" command to add the desired prefs to any existing + file. (its a good idea, but unforunately, the key names prevent that from + working, i.e. loadlib1, loadlib2, etc) ------------------------------------------------------------------------------ semi-abandoned TODOs - -- make Help menu generator recursive - - make a web page that has stuff that can't be included due to license issues: (percolate) diff --git a/packages/darwin_app/patches/MACOSX-to-__APPLE__.patch b/packages/darwin_app/patches/MACOSX-to-__APPLE__.patch deleted file mode 100644 index c8347c06..00000000 --- a/packages/darwin_app/patches/MACOSX-to-__APPLE__.patch +++ /dev/null @@ -1,357 +0,0 @@ -Index: configure.in -=================================================================== -RCS file: /cvsroot/pure-data/pd/src/configure.in,v -retrieving revision 1.10 -diff -u -w -r1.10 configure.in ---- configure.in 30 May 2005 04:37:25 -0000 1.10 -+++ configure.in 9 Jun 2005 06:01:51 -0000 -@@ -218,7 +218,7 @@ - -framework AudioUnit -framework AudioToolbox \ - -framework Carbon -framework CoreMIDI" - EXT=pd_darwin -- MORECFLAGS="-DMACOSX -DUNISTD -I/usr/X11R6/include \ -+ MORECFLAGS="-DUNISTD -I/usr/X11R6/include \ - -I../portaudio/pa_common -I../portaudio/pablio \ - -I../portmidi/pm_common -I../portmidi/pm_mac \ - -I../portmidi/porttime \ -Index: d_array.c -=================================================================== -RCS file: /cvsroot/pure-data/pd/src/d_array.c,v -retrieving revision 1.5 -diff -u -w -r1.5 d_array.c ---- d_array.c 11 Nov 2004 04:58:21 -0000 1.5 -+++ d_array.c 9 Jun 2005 06:01:51 -0000 -@@ -540,12 +540,12 @@ - #define int32 int32_t - - #else --#ifdef MACOSX -+#ifdef __APPLE__ - #define HIOFFSET 0 /* word offset to find MSB */ - #define LOWOFFSET 1 /* word offset to find LSB */ - #define int32 int /* a data type that has 32 bits */ - --#endif /* MACOSX */ -+#endif /* __APPLE__ */ - #endif /* __linux__ */ - #endif /* MSW */ - #endif /* SGI */ -Index: d_osc.c -=================================================================== -RCS file: /cvsroot/pure-data/pd/src/d_osc.c,v -retrieving revision 1.2 -diff -u -w -r1.2 d_osc.c ---- d_osc.c 6 Sep 2004 20:20:33 -0000 1.2 -+++ d_osc.c 9 Jun 2005 06:01:51 -0000 -@@ -56,12 +56,12 @@ - #define int32 int32_t - - #else --#ifdef MACOSX -+#ifdef __APPLE__ - #define HIOFFSET 0 /* word offset to find MSB */ - #define LOWOFFSET 1 /* word offset to find LSB */ - #define int32 int /* a data type that has 32 bits */ - --#endif /* MACOSX */ -+#endif /* __APPLE__ */ - #endif /* __linux__ */ - #endif /* MSW */ - #endif /* SGI */ -Index: g_canvas.c -=================================================================== -RCS file: /cvsroot/pure-data/pd/src/g_canvas.c,v -retrieving revision 1.7 -diff -u -w -r1.7 g_canvas.c ---- g_canvas.c 18 May 2005 04:28:50 -0000 1.7 -+++ g_canvas.c 9 Jun 2005 06:01:51 -0000 -@@ -25,7 +25,7 @@ - #define GLIST_DEFCANVASWIDTH 450 - #define GLIST_DEFCANVASHEIGHT 300 - --#ifdef MACOSX -+#ifdef __APPLE__ - #define GLIST_DEFCANVASYLOC 22 - #else - #define GLIST_DEFCANVASYLOC 0 -Index: g_editor.c -=================================================================== -RCS file: /cvsroot/pure-data/pd/src/g_editor.c,v -retrieving revision 1.7 -diff -u -w -r1.7 g_editor.c ---- g_editor.c 18 May 2005 04:28:50 -0000 1.7 -+++ g_editor.c 9 Jun 2005 06:01:52 -0000 -@@ -949,7 +949,7 @@ - - /* on one-button-mouse machines, you can use double click to - mean right click (which gets the popup menu.) Do this for Mac. */ --#ifdef MACOSX -+#ifdef __APPLE__ - #define SIMULATERIGHTCLICK - #endif - -@@ -1412,7 +1412,7 @@ - keyupsym = gensym("#keyup"); - keynamesym = gensym("#keyname"); - } --#ifdef MACOSX -+#ifdef __APPLE__ - if (keynum == 30) - keynum = 0, gotkeysym = gensym("Up"); - else if (keynum == 31) -Index: g_text.c -=================================================================== -RCS file: /cvsroot/pure-data/pd/src/g_text.c,v -retrieving revision 1.7 -diff -u -w -r1.7 g_text.c ---- g_text.c 18 May 2005 04:28:51 -0000 1.7 -+++ g_text.c 9 Jun 2005 06:01:52 -0000 -@@ -1100,7 +1100,7 @@ - - /* -------------------- the "text" class ------------ */ - --#ifdef MACOSX -+#ifdef __APPLE__ - #define EXTRAPIX 2 - #else - #define EXTRAPIX 1 -Index: s_file.c -=================================================================== -RCS file: /cvsroot/pure-data/pd/src/s_file.c,v -retrieving revision 1.5 -diff -u -w -r1.5 s_file.c ---- s_file.c 30 May 2005 03:04:18 -0000 1.5 -+++ s_file.c 9 Jun 2005 06:01:52 -0000 -@@ -205,7 +205,7 @@ - - #endif /* MSW */ - --#ifdef MACOSX -+#ifdef __APPLE__ - - static void sys_initloadpreferences( void) - { -@@ -255,7 +255,7 @@ - { - } - --#endif /* MACOSX */ -+#endif /* __APPLE__ */ - - void sys_loadpreferences( void) - { -Index: s_inter.c -=================================================================== -RCS file: /cvsroot/pure-data/pd/src/s_inter.c,v -retrieving revision 1.9 -diff -u -w -r1.9 s_inter.c ---- s_inter.c 30 May 2005 03:04:18 -0000 1.9 -+++ s_inter.c 9 Jun 2005 06:01:53 -0000 -@@ -40,7 +40,7 @@ - #include - #include - --#ifdef MACOSX -+#ifdef __APPLE__ - #include - #include - #include -@@ -1007,7 +1007,7 @@ - else if (!childpid) /* we're the child */ - { - seteuid(getuid()); /* lose setuid priveliges */ --#ifndef MACOSX -+#ifndef __APPLE__ - /* the wish process in Unix will make a wish shell and - read/write standard in and out unless we close the - file descriptors. Somehow this doesn't make the MAC OSX -@@ -1026,7 +1026,7 @@ - #endif - if (!sys_guicmd) - { --#ifdef MACOSX -+#ifdef __APPLE__ - char *homedir = getenv("HOME"), filename[250]; - struct stat statbuf; - if (!homedir || strlen(homedir) > 150) -@@ -1165,7 +1165,7 @@ - if (!SetPriorityClass(GetCurrentProcess(), HIGH_PRIORITY_CLASS)) - fprintf(stderr, "pd: couldn't set high priority class\n"); - #endif --#ifdef MACOSX -+#ifdef __APPLE__ - if (sys_hipriority) - { - struct sched_param param; -@@ -1177,7 +1177,7 @@ - if (err) - post("warning: high priority scheduling failed\n"); - } --#endif /* MACOSX */ -+#endif /* __APPLE__ */ - - if (!sys_nogui && !sys_guisetportnumber) - { -Index: s_loader.c -=================================================================== -RCS file: /cvsroot/pure-data/pd/src/s_loader.c,v -retrieving revision 1.6 -diff -u -w -r1.6 s_loader.c ---- s_loader.c 30 May 2005 03:04:19 -0000 1.6 -+++ s_loader.c 9 Jun 2005 06:01:53 -0000 -@@ -13,7 +13,7 @@ - #include - #include - #endif --#ifdef MACOSX -+#ifdef __APPLE__ - #include - #endif - #include -@@ -37,7 +37,7 @@ - #ifdef __linux__ - ".pd_linux"; - #endif --#ifdef MACOSX -+#ifdef __APPLE__ - ".pd_darwin"; - #endif - #ifdef MSW -@@ -90,7 +90,7 @@ - if (lastdot = strrchr(nameptr, '.')) - *lastdot = 0; - --#ifdef MACOSX -+#ifdef __APPLE__ - strcpy(symname, "_"); - strcat(symname, nameptr); - #else -@@ -122,7 +122,7 @@ - } - makeout = (t_xxx)GetProcAddress(ntdll, symname); - #endif --#ifdef MACOSX -+#ifdef __APPLE__ - { - NSObjectFileImage image; - void *ret; -Index: s_path.c -=================================================================== -RCS file: /cvsroot/pure-data/pd/src/s_path.c,v -retrieving revision 1.6 -diff -u -w -r1.6 s_path.c ---- s_path.c 18 May 2005 04:28:51 -0000 1.6 -+++ s_path.c 9 Jun 2005 06:01:53 -0000 -@@ -356,7 +356,7 @@ - } - - --/* Startup file reading for linux and MACOSX. As of 0.38 this will be -+/* Startup file reading for linux and Mac OS X. As of 0.38 this will be - deprecated in favor of the "settings" mechanism */ - - int sys_argparse(int argc, char **argv); -Index: s_stuff.h -=================================================================== -RCS file: /cvsroot/pure-data/pd/src/s_stuff.h,v -retrieving revision 1.6 -diff -u -w -r1.6 s_stuff.h ---- s_stuff.h 28 Nov 2004 21:20:43 -0000 1.6 -+++ s_stuff.h 9 Jun 2005 06:01:53 -0000 -@@ -160,7 +160,7 @@ - #define API_DEFAULT API_MMIO - #define API_DEFSTRING "MMIO" - #endif --#ifdef MACOSX -+#ifdef __APPLE__ - #define API_DEFAULT API_PORTAUDIO - #define API_DEFSTRING "portaudio" - #endif -Index: t_main.c -=================================================================== -RCS file: /cvsroot/pure-data/pd/src/t_main.c,v -retrieving revision 1.2 -diff -u -w -r1.2 t_main.c ---- t_main.c 6 Sep 2004 20:20:36 -0000 1.2 -+++ t_main.c 9 Jun 2005 06:01:53 -0000 -@@ -14,7 +14,7 @@ - */ - - --#ifndef MACOSX /* linux and IRIX only; in MACOSX we don't link this in */ -+#ifndef __APPLE__ /* linux and IRIX only; in Mac OS X we don't link this in */ - #include "tk.h" - #include - -@@ -112,4 +112,4 @@ - return TCL_OK; - } - --#endif /* MACOSX */ -+#endif /* __APPLE__ */ -Index: t_tkcmd.c -=================================================================== -RCS file: /cvsroot/pure-data/pd/src/t_tkcmd.c,v -retrieving revision 1.3 -diff -u -w -r1.3 t_tkcmd.c ---- t_tkcmd.c 6 Nov 2004 16:07:34 -0000 1.3 -+++ t_tkcmd.c 9 Jun 2005 06:01:53 -0000 -@@ -40,7 +40,7 @@ - #include "tk.h" - #endif - --#ifdef MACOSX -+#ifdef __APPLE__ - #define STARTGUI - #endif - -@@ -528,7 +528,7 @@ - /* in linux, we load the tk code from here (in MSW and MACOS, this - is done by passing the name of the file as a startup argument to - the wish shell.) */ --#if !defined(MSW) && !defined(MACOSX) -+#if !defined(MSW) && !defined(__APPLE__) - void pdgui_doevalfile(Tcl_Interp *interp, char *s) - { - char buf[GUISTRING]; -@@ -566,7 +566,7 @@ - #endif - pdgui_setupsocket(); - /* read in the startup file */ --#if !defined(MSW) && !defined(MACOSX) -+#if !defined(MSW) && !defined(__APPLE__) - pdgui_evalfile("pd.tk"); - #endif - } -Index: x_arithmetic.c -=================================================================== -RCS file: /cvsroot/pure-data/pd/src/x_arithmetic.c,v -retrieving revision 1.2 -diff -u -w -r1.2 x_arithmetic.c ---- x_arithmetic.c 6 Sep 2004 20:20:36 -0000 1.2 -+++ x_arithmetic.c 9 Jun 2005 06:01:53 -0000 -@@ -11,7 +11,7 @@ - - - /* MSW and OSX don't appear to have single-precision ANSI math */ --#if defined(MSW) || defined(MACOSX) -+#if defined(MSW) || defined(__APPLE__) - #define sinf sin - #define cosf cos - #define atanf atan -Index: x_misc.c -=================================================================== -RCS file: /cvsroot/pure-data/pd/src/x_misc.c,v -retrieving revision 1.2 -diff -u -w -r1.2 x_misc.c ---- x_misc.c 6 Sep 2004 20:20:36 -0000 1.2 -+++ x_misc.c 9 Jun 2005 06:01:53 -0000 -@@ -21,7 +21,7 @@ - #include - #endif - --#if defined (MACOSX) || defined (__FreeBSD__) -+#if defined (__APPLE__) || defined (__FreeBSD__) - #define HZ CLK_TCK - #endif - diff --git a/packages/darwin_app/patches/darwin_linking_fixes.patch b/packages/darwin_app/patches/darwin_linking_fixes.patch deleted file mode 100644 index dd1c2db3..00000000 --- a/packages/darwin_app/patches/darwin_linking_fixes.patch +++ /dev/null @@ -1,149 +0,0 @@ -Index: configure.in -=================================================================== -RCS file: /cvsroot/pure-data/pd/src/configure.in,v -retrieving revision 1.10 -diff -u -w -r1.10 configure.in ---- configure.in 30 May 2005 04:37:25 -0000 1.10 -+++ configure.in 7 Jun 2005 00:14:52 -0000 -@@ -13,6 +13,7 @@ - AC_SUBST(USE_DEBUG_CFLAGS, no) - AC_SUBST(SYSSRC) - AC_SUBST(STRIPFLAG) -+AC_SUBST(TCLTK_FRAMEWORKS_PATH) - AC_SUBST(GUINAME) - AC_SUBST(GUIFLAGS) - AC_SUBST(OSNUMBER) -@@ -207,6 +208,24 @@ - OPT_CFLAGS="-g" - else - OPT_CFLAGS="-O6 -funroll-loops -fomit-frame-pointer" -+ -+ if test x$jack == "xyes"; -+ then -+ LDFLAGS=$LDFLAGS" -lrt -ljack" -+ fi -+ if test x$jack == "xrun"; -+ then -+ LDFLAGS=$LDFLAGS" -lrt -ljack" -+ fi -+ fi -+ -+ if test x$jack == "xyes"; -+ then -+ LDFLAGS=$LDFLAGS" -lrt -ljack" -+ fi -+ if test x$jack == "xrun"; -+ then -+ LDFLAGS=$LDFLAGS" -lrt -ljack" - fi - echo OPT_CFLAGS --------------- $OPT_CFLAGS - OSNUMBER=0 -@@ -245,11 +264,25 @@ - ../portmidi/pm_common/portmidi.c \ - ../portmidi/porttime/ptmacosx_cf.c " - STRIPFLAG="" -- GUINAME="pdtcl" -- GUIFLAGS="-F../../Frameworks -framework Tcl -framework Tk \ -- -I../../Frameworks/Tk.framework/Versions/Current/Headers \ -- -I../../Frameworks/Tcl.framework/Versions/Current/Headers \ -- -I../../Frameworks/Tcl.framework/Versions/8.4/PrivateHeaders" -+ GUINAME="libPdTcl.dylib" -+ -+# find the Tcl/Tk Frameworks -+ if test -d "../../Frameworks"; -+ then -+ # Miller's location -+ TCLTK_FRAMEWORKS_PATH="../../Frameworks" -+ elif test -d "/Library/Frameworks"; -+ then -+ # get it from the default install location -+ TCLTK_FRAMEWORKS_PATH="/Library/Frameworks" -+ else -+ # Panther has Tcl here; Tiger has Tcl and Tk here -+ TCLTK_FRAMEWORKS_PATH="/System/Library/Frameworks" -+ fi -+ GUIFLAGS="-F$TCLTK_FRAMEWORKS_PATH -framework Tcl -framework Tk \ -+ -I$TCLTK_FRAMEWORKS_PATH/Tk.framework/Versions/Current/Headers \ -+ -I$TCLTK_FRAMEWORKS_PATH/Tcl.framework/Versions/Current/Headers \ -+ -I$TCLTK_FRAMEWORKS_PATH/Tcl.framework/Versions/8.4/PrivateHeaders" - if test x$USE_DEBUG_CFLAGS == "xyes"; - then - OPT_CFLAGS="-g" -@@ -258,11 +291,14 @@ - fi - OSNUMBER=2 - EXTERNTARGET=pd_darwin -+ - if test x$jack == "xyes"; - then -- LDFLAGS=$LDFLAGS" -framework Jack" -- MORECFLAGS=$MORECFLAGS" -DUSEAPI_JACK" -- SYSSRC=$SYSSRC" s_audio_jack.c" -+ LDFLAGS=$LDFLAGS" -weak_framework Jack" -+ fi -+ if test x$jack == "xrun"; -+ then -+ LDFLAGS=$LDFLAGS" -weak_framework Jack" - fi - fi - -@@ -272,13 +308,11 @@ - then - MORECFLAGS=$MORECFLAGS" -DUSEAPI_JACK" - SYSSRC=$SYSSRC" s_audio_jack.c" -- LDFLAGS=$LDFLAGS" -lrt -ljack" - fi - if test x$jack == "xrun"; - then - MORECFLAGS=$MORECFLAGS" -DUSEAPI_JACK -DJACK_XRUN" - SYSSRC=$SYSSRC" s_audio_jack.c" -- LDFLAGS=$LDFLAGS" -lrt -ljack" - fi - - # extra flags for alpha machines -Index: makefile.in -=================================================================== -RCS file: /cvsroot/pure-data/pd/src/makefile.in,v -retrieving revision 1.6 -diff -u -w -r1.6 makefile.in ---- makefile.in 18 May 2005 04:28:51 -0000 1.6 -+++ makefile.in 7 Jun 2005 00:14:52 -0000 -@@ -97,11 +97,17 @@ - cp u_main.tk $(BIN_DIR)/pd.tk - - #this is for Max OSX only... --$(BIN_DIR)/pdtcl: $(GOBJ) $(GSRC) -- cd ../obj; libtool -dynamic -o $(BIN_DIR)/pdtcl $(GOBJ) \ -- ../../Frameworks/Tk.framework/Versions/Current/Tk \ -- ../../Frameworks/Tcl.framework/Versions/Current/Tcl \ -- /usr/lib/libSystem.B.dylib -+$(BIN_DIR)/libPdTcl.dylib: $(GOBJ) $(GSRC) -+ cd ../obj && $(CC) -dynamiclib -read_only_relocs warning \ -+ -o $(BIN_DIR)/libPdTcl.dylib $(GOBJ) \ -+ -F@TCLTK_FRAMEWORKS_PATH@ \ -+ -framework Tcl -framework Tk -framework System \ -+ -Wl,-install_name,@executable_path/../Resources/bin/libPdTcl.dylib -+ install_name_tool -change @TCLTK_FRAMEWORKS_PATH@/Tcl.framework/Versions/8.4/Tcl\ -+ @executable_path/../Frameworks/Tcl.framework/Versions/8.4/Tcl \ -+ -change @TCLTK_FRAMEWORKS_PATH@/Tk.framework/Versions/8.4/Tk \ -+ @executable_path/../Frameworks/Tk.framework/Versions/8.4/Tk \ -+ ../bin/libPdTcl.dylib - - externs: - cd ../extra/bonk~;make @EXTERNTARGET@ -Index: u_main.tk -=================================================================== -RCS file: /cvsroot/pure-data/pd/src/u_main.tk,v -retrieving revision 1.9 -diff -u -w -r1.9 u_main.tk ---- u_main.tk 18 May 2005 04:28:51 -0000 1.9 -+++ u_main.tk 7 Jun 2005 00:14:52 -0000 -@@ -48,7 +48,7 @@ - global pd_tearoff - set pd_gui2 [string range $argv0 0 [expr [string last / $argv0 ] - 1]] - set pd_guidir $pd_gui2/.. -- load $pd_guidir/bin/pdtcl -+ load $pd_guidir/bin/libPdTcl.dylib - set pd_tearoff 0 - - # tk::mac::OpenDocument is called with the filenames put into the diff --git a/packages/darwin_app/patches/display_tweaks.patch b/packages/darwin_app/patches/display_tweaks.patch deleted file mode 100644 index 59771854..00000000 --- a/packages/darwin_app/patches/display_tweaks.patch +++ /dev/null @@ -1,33 +0,0 @@ ---- ../../pd/src/u_main.tk Thu Jun 9 11:54:59 2005 -+++ build/Pd.app/Contents/Resources/bin/pd.tk Thu Jun 9 16:17:58 2005 -@@ -37,6 +37,12 @@ - if {$pd_nt == 2} { - # turn on James Tittle II's fast drawing (wait until I can test this...): - # set tk::mac::useCGDrawing 1 -+ # set minimun line size for anti-aliasing. If set to 1 or 0, then every -+ # line will be anti-aliased. While this makes connections and circles in -+ # [bng] and such look really good, it makes boxes and messages look out of -+ # focus. Setting this to 2 makes it so the thick audio rate connections -+ # are anti-aliased. 2005-06-09 -+ set tk::mac::CGAntialiasLimit 2 - global pd_guidir - global pd_tearoff - set pd_gui2 [string range $argv0 0 [expr [string last / $argv0 ] - 1]] -@@ -158,7 +164,7 @@ - - - frame .printout --text .printout.text -relief raised -bd 2 -font -*-courier-bold--normal--12-* \ -+text .printout.text -relief raised -bd 2 -font { courier 12 } \ - -yscrollcommand ".printout.scroll set" -width 80 - # .printout.text insert end "\n\n\n\n\n\n\n\n\n\n" - scrollbar .printout.scroll -command ".printout.text yview" -@@ -337,7 +343,7 @@ - global pd_myversion - set name [format ".help%d" $doc_number] - toplevel $name -- text $name.text -relief raised -bd 2 -font -*-courier-bold--normal--12-* \ -+ text $name.text -relief raised -bd 2 -font { helvetica 14 } \ - -yscrollcommand "$name.scroll set" -background white - scrollbar $name.scroll -command "$name.text yview" - pack $name.scroll -side right -fill y diff --git a/packages/darwin_app/patches/extended-help-menu.patch b/packages/darwin_app/patches/extended-help-menu.patch deleted file mode 100644 index 00809abb..00000000 --- a/packages/darwin_app/patches/extended-help-menu.patch +++ /dev/null @@ -1,174 +0,0 @@ -Index: u_main.tk -=================================================================== -RCS file: /cvsroot/pure-data/pd/src/u_main.tk,v ---- pd-0.38-4/src/u_main.tk Sun Feb 20 20:03:36 2005 -+++ u_main.tk Wed Nov 16 00:33:02 2005 -@@ -374,22 +374,41 @@ - set help_directory $pd_guidir/doc - set help_top_directory $pd_guidir/doc - -+################## generate_menu_doc_link ######################### -+# This procedure generates a temporary mirror of the documentation directory -+# in /tmp so that it can be opened from the Help->Pure Documentation... menu -+# under Mac OS X. It is meant to be run at startup. -+# Damn you Apple and your "hide stuff from the user" "features". -+# -+proc generate_menu_doc_link {} { -+ global help_directory -+ -+ regsub -all "/" $help_directory "." help_directory_alias -+ set help_directory_alias /tmp/$help_directory_alias -+ set help_directory_tmpdir $help_directory_alias/doc -+ # if something other than a directory exists, delete it -+ if [file exists $help_directory_alias] { -+ file delete -force -- $help_directory_alias -+ } -+ if { ! [ file isdirectory $help_directory_tmpdir ] } { -+ file mkdir $help_directory_tmpdir -+ } -+ foreach file [ lsort [ glob -dir $help_directory * ] ] { -+ regsub -all ".*/" $file "" link_file_name -+ file link -symbolic [file join $help_directory_tmpdir $link_file_name ] $file -+ } -+ set help_directory $help_directory_tmpdir -+} -+ -+################## menu_documentation ######################### - proc menu_documentation {} { - global help_directory - global pd_nt - global pd_guidir - -- if {$pd_nt == 2} { -- exec rm -rf /tmp/pd-documentation -- exec cp -pr $pd_guidir/doc /tmp/pd-documentation -- set filename [tk_getOpenFile -defaultextension .pd \ -- -filetypes { {{documentation} {.pd .txt .htm}} } \ -- -initialdir /tmp/pd-documentation] -- } else { - set filename [tk_getOpenFile -defaultextension .pd \ - -filetypes { {{documentation} {.pd .txt .htm}} } \ - -initialdir $help_directory] -- } - if {$filename != ""} { - if {[string first .txt $filename] >= 0} { - menu_opentext $filename -@@ -411,35 +430,57 @@ - - set dirname $pd_guidir/$subdir - -+ set file_type [file type $dirname/$basename] -+ if { $file_type == "directory" } { -+ pd [concat pd open [pdtk_enquote $basename] \ -+ [pdtk_enquote $dirname] \;] -+ } else { - if {[regexp ".*\.(txt|c)$" $basename]} { - menu_opentext $dirname/$basename -+ } elseif {[regexp ".*\.(pd|max)$" $basename]} { -+ pd [concat pd open [pdtk_enquote $basename] \ -+ [pdtk_enquote $dirname] \;] - } elseif {[regexp ".*\.html?$" $basename]} { - menu_openhtml $dirname/$basename - } else { -- pd [concat pd open [pdtk_enquote $basename] \ -- [pdtk_enquote $dirname] \;] -+ menu_openhtml $dirname/$basename -+ } - } - } - --proc doc_submenu {helpmenu subdir} { -- global help_top_directory pd_tearoff -- -- set menudir $help_top_directory/$subdir - -- regsub -all "\\\." $subdir "" submenu -+################## menu_doc_submenu ######################### - -+# this is a recursive function to generation a nested menu in the help menu -+# which shows the complete contents of the doc directory -+proc menu_doc_submenu {helpmenu base_dir sub_dir} { -+ global pd_tearoff -+ global help_top_directory -+ -+ set menu_dir $help_top_directory/$base_dir/$sub_dir -+ -+ foreach file [ lsort [ glob -nocomplain -dir $menu_dir * ] ] { -+ set file_type [file type $file] -+ regsub {.*/(.*$)} $file {\1} file_name -+ # If links are going to be used then there needs to be a check to see if each -+ # link might cause this function to recurse forever -+ # if { $file_type == "link"} { -+ # puts stderr "LINK: $file" -+ # } -+ if { $file_type == "file" } { -+ # only put certain file types on the menu -+ if {[regexp ".*\.(htm|html|c|pd|txt|pdf|wav|aif|aiff)$" $file]} { -+ $helpmenu add command -label $file_name \ -+ -command "menu_doc_open doc/$base_dir/$sub_dir $file_name" -+ } -+ } elseif { $file_type == "directory" } { -+ regsub -all "\\\." [string tolower $file_name] "" submenu - menu $helpmenu.$submenu -tearoff $pd_tearoff -- regsub -all "\\\." $subdir " " submenuname -+ regsub -all "\\\." $file_name " " submenuname - $helpmenu add cascade -label $submenuname \ - -menu $helpmenu.$submenu -- --# use this glob pattern to exclude the supporting files --# foreach file [ lsort [ glob -dir $menudir {*[0-9][0-9]*} ] ] -- foreach file [ lsort [ glob -dir $menudir * ] ] { -- set filename "" -- regsub {.*/(.*\..+$)} $file {\1} filename -- $helpmenu.$submenu add command -label $filename \ -- -command "menu_doc_open doc/$subdir $filename" -+ menu_doc_submenu $helpmenu.$submenu $base_dir/$sub_dir [file tail $file] -+ } - } - } - -@@ -494,7 +535,18 @@ - - - # the "Help" menu -- if {$pd_nt != 2} { -+ if {$pd_nt == 2} { -+# Apple doesn't allow cascading menus in their Help so I had to call this -+# one "docs" -+ generate_menu_doc_link -+ $mbar.docs add command -label {Browse Documentation...} \ -+ -command {menu_documentation} -+ # the help menu only really works well on Mac OS X -+ $mbar.docs add command -label {Pd HTML Manual...} \ -+ -command {menu_doc_open doc/1.manual index.htm} -+ $mbar.docs add separator -+ menu_doc_submenu $mbar.docs "." "." -+ } else { - # a menu on the main menubar named "$whatever.help" while be treated - # as a special menu with specific behaviors on different platforms. - # See SPECIAL MENUS IN MENUBARS http://www.tcl.tk/man/tcl8.4/TkCmd/menu.htm -@@ -502,22 +554,9 @@ - -command {menu_doc_open doc/1.manual 1.introduction.txt} - $mbar.help add command -label {Pure Documentation...} \ - -command {menu_documentation} -- # add menu items for each section instead of using Pd patches -- $mbar.help add separator -- set helpmenuname help -- } else { --# Apple doesn't allow cascading menus in their Help so I had to call this --# one "docs" -- set helpmenuname docs -- } -- -- $mbar.$helpmenuname add command -label {1 manual...} \ -+ $mbar.help add command -label {1 manual...} \ - -command {menu_doc_open doc/1.manual index.htm} -- doc_submenu $mbar.$helpmenuname 2.control.examples -- doc_submenu $mbar.$helpmenuname 3.audio.examples -- doc_submenu $mbar.$helpmenuname 4.fft.examples -- doc_submenu $mbar.$helpmenuname 5.reference -- doc_submenu $mbar.$helpmenuname 6.externs -+ } - } - - #################### the "File" menu for the Pd window ############## diff --git a/packages/darwin_app/patches/special_chars_hack.patch b/packages/darwin_app/patches/special_chars_hack.patch deleted file mode 100644 index 63effe65..00000000 --- a/packages/darwin_app/patches/special_chars_hack.patch +++ /dev/null @@ -1,58 +0,0 @@ -Index: s_loader.c -=================================================================== -RCS file: /cvsroot/pure-data/pd/src/s_loader.c,v -retrieving revision 1.6 -diff -u -w -r1.6 s_loader.c ---- s_loader.c 30 May 2005 03:04:19 -0000 1.6 -+++ s_loader.c 15 Nov 2005 22:28:41 -0000 -@@ -49,7 +49,7 @@ - int sys_load_lib(char *dirname, char *classname) - { - char symname[MAXPDSTRING], filename[MAXPDSTRING], dirbuf[MAXPDSTRING], -- classname2[MAXPDSTRING], *nameptr, *lastdot; -+ classname2[MAXPDSTRING], *nameptr, *lastdot, tmptildestr[MAXPDSTRING]; - void *dlobj; - t_xxx makeout = NULL; - int fd; -@@ -96,9 +96,40 @@ - #else - strcpy(symname, nameptr); - #endif -+ /* -+ * this is a quick hack to get the matrix externals working as single -+ * files. This should be done with hex translation of special characters -+ * -+ */ - /* if the last character is a tilde, replace with "_tilde" */ - if (symname[strlen(symname) - 1] == '~') -- strcpy(symname + (strlen(symname) - 1), "_tilde"); -+ { -+ strcpy(symname + (strlen(symname) - 1), ""); -+ strcpy(tmptildestr, "_tilde"); -+ } -+ else -+ { -+ strcpy(tmptildestr, ""); -+ } -+ switch (symname[strlen(symname) - 1]) -+ { -+ case '.': -+ strcpy(symname + (strlen(symname) - 1), "_dot"); -+ break; -+ case '+': -+ strcpy(symname + (strlen(symname) - 1), "_plus"); -+ break; -+ case '-': -+ strcpy(symname + (strlen(symname) - 1), "_hyphen"); -+ break; -+ case '*': -+ strcpy(symname + (strlen(symname) - 1), "_asterisk"); -+ break; -+ case '^': -+ strcpy(symname + (strlen(symname) - 1), "_caret"); -+ break; -+ } -+ strcat(symname, tmptildestr); - /* and append _setup to form the C setup function name */ - strcat(symname, "_setup"); - #ifdef DL_OPEN diff --git a/packages/darwin_app/patches/weak_linking.patch b/packages/darwin_app/patches/weak_linking.patch deleted file mode 100644 index fa0f6601..00000000 --- a/packages/darwin_app/patches/weak_linking.patch +++ /dev/null @@ -1,22 +0,0 @@ -Index: makefile.in -=================================================================== -RCS file: /cvsroot/pure-data/pd/src/makefile.in,v -retrieving revision 1.8 -diff -u -w -r1.8 makefile.in ---- makefile.in 24 Jul 2005 19:41:14 -0000 1.8 -+++ makefile.in 25 Jul 2005 01:59:05 -0000 -@@ -85,9 +85,12 @@ - $(BIN_DIR)/pdreceive: u_pdreceive.c - $(CC) $(CFLAGS) $(STRIPFLAG) -o $(BIN_DIR)/pdreceive u_pdreceive.c - -+# MACOSX_DEPLOYMENT_TARGET=10.2 is necessary on Mac OS X to support weak -+# linking of frameworks. Since its just a environment variable, it should be -+# safely ignored on other platforms. - $(PDEXEC): $(OBJ) -- cd ../obj; $(CC) $(LDFLAGS) $(DBG_CFLAGS) -o $(PDEXEC) $(OBJ) \ -- $(LIB) -+ cd ../obj; MACOSX_DEPLOYMENT_TARGET=10.2 $(CC) $(LDFLAGS) $(DBG_CFLAGS) \ -+ -o $(PDEXEC) $(OBJ) $(LIB) - - $(BIN_DIR)/pd-gui: $(GOBJ) $(GSRC) - cd ../obj; $(CC) $(INCLUDE) -o $(BIN_DIR)/$(GUINAME) $(GOBJ) \ diff --git a/packages/patches/build_vars_4_makefile.in.patch b/packages/patches/build_vars_4_makefile.in.patch new file mode 100644 index 00000000..d398ae4e --- /dev/null +++ b/packages/patches/build_vars_4_makefile.in.patch @@ -0,0 +1,98 @@ +Index: makefile.in +=================================================================== +RCS file: /cvsroot/pure-data/pd/src/makefile.in,v +retrieving revision 1.5 +diff -u -w -r1.5 makefile.in +--- makefile.in 6 Nov 2004 16:07:33 -0000 1.5 ++++ makefile.in 21 Nov 2005 04:32:51 -0000 +@@ -113,29 +113,48 @@ + cd ../extra/pique;make @EXTERNTARGET@ + + INSTDIR = $(DESTDIR)/$(INSTALL_PREFIX) +-MANINSTDIR = $(DESTDIR)/$(INSTALL_PREFIX)/$(MANDIR) + BINARYMODE=@binarymode@ + ++# varibles to match packages/Makefile.buildlayout so that they can be easily ++# overridden when building extended builds. ++BIN_DEST = $(INSTDIR)/bin ++DOCS_DEST = $(INSTDIR)/doc ++INCLUDE_DEST = $(INSTDIR)/include ++LIBPD_DEST = $(INSTDIR)/lib/pd ++LIBBIN_DEST = $(LIBPD_DEST)/bin ++MAN_DEST = $(INSTDIR)/$(MANDIR) ++ + install: all +- install -d $(INSTDIR)/lib/pd/bin +- install $(BIN_DIR)/$(GUINAME) $(INSTDIR)/lib/pd/bin/$(GUINAME) +- install $(BIN_DIR)/pd-watchdog $(INSTDIR)/lib/pd/bin/pd-watchdog +- install -m644 $(BIN_DIR)/pd.tk $(INSTDIR)/lib/pd/bin/pd.tk +- install -d $(INSTDIR)/bin +- install $(BINARYMODE) $(PDEXEC) $(INSTDIR)/bin/pd +- install -m755 $(BIN_DIR)/pdsend $(INSTDIR)/bin/pdsend +- install -m755 $(BIN_DIR)/pdreceive $(INSTDIR)/bin/pdreceive +- cp -pr ../doc ../extra $(INSTDIR)/lib/pd/ ++ install -d $(LIBBIN_DEST) ++ install $(BIN_DIR)/$(GUINAME) $(LIBBIN_DEST)/$(GUINAME) ++ install $(BIN_DIR)/pd-watchdog $(LIBBIN_DEST)/pd-watchdog ++ install -m644 $(BIN_DIR)/pd.tk $(LIBBIN_DEST)/pd.tk ++ install -d $(BIN_DEST) ++ install $(BINARYMODE) $(PDEXEC) $(BIN_DEST)/pd ++ install -m755 $(BIN_DIR)/pdsend $(BIN_DEST)/pdsend ++ install -m755 $(BIN_DIR)/pdreceive $(BIN_DEST)/pdreceive ++ for dir in $(shell ls -1 ../doc | grep -v CVS); do \ ++ echo "installing $$dir"; \ ++ install -d $(DOCS_DEST)/$$dir ; \ ++ install -p ../doc/$$dir/*.* $(DOCS_DEST)/$$dir ; \ ++ done ++ for dir in $(shell ls -1 ../doc/7.stuff | grep -v CVS); do \ ++ echo "installing 7.stuff/$$dir"; \ ++ install -d $(DOCS_DEST)/7.stuff/$$dir ; \ ++ install -p ../doc/7.stuff/$$dir/*.* $(DOCS_DEST)/7.stuff/$$dir ; \ ++ done ++ cp -pr ../extra $(LIBPD_DEST)/ + rm -f $(INSTDIR)/extra/*/*.o +- install -d $(INSTDIR)/include +- install -m644 m_pd.h $(INSTDIR)/include/m_pd.h +- install -d $(MANINSTDIR)/man1 +- gzip < ../man/pd.1 > $(MANINSTDIR)/man1/pd.1.gz +- chmod 644 $(MANINSTDIR)/man1/pd.1.gz +- gzip < ../man/pdsend.1 > $(MANINSTDIR)/man1/pdsend.1.gz +- chmod 644 $(MANINSTDIR)/man1/pdsend.1.gz +- gzip < ../man/pdreceive.1 > $(MANINSTDIR)/man1/pdreceive.1.gz +- chmod 644 $(MANINSTDIR)/man1/pdreceive.1.gz ++ install -d $(INCLUDE_DEST) ++ install -m644 m_pd.h $(INCLUDE_DEST)/m_pd.h ++ install -d $(MAN_DEST)/man1 ++ gzip < ../man/pd.1 > $(MAN_DEST)/man1/pd.1.gz ++ chmod 644 $(MAN_DEST)/man1/pd.1.gz ++ gzip < ../man/pdsend.1 > $(MAN_DEST)/man1/pdsend.1.gz ++ chmod 644 $(MAN_DEST)/man1/pdsend.1.gz ++ gzip < ../man/pdreceive.1 > $(MAN_DEST)/man1/pdreceive.1.gz ++ chmod 644 $(MAN_DEST)/man1/pdreceive.1.gz ++ @echo "Pd install succeeded." + + local-clean: + -rm -f ../obj/* $(BIN_DIR)/pd $(BIN_DIR)/$(GUINAME) $(BIN_DIR)/pdsend \ +@@ -166,14 +185,14 @@ + $(CC) $(INCLUDE) $(CFLAGS) -M $(SRC) > makefile.dependencies + + uninstall: +- rm -f -r $(INSTDIR)/lib/pd +- rm -f $(INSTDIR)/bin/pd +- rm -f $(INSTDIR)/bin/pdsend +- rm -f $(INSTDIR)/bin/pdreceive +- rm -f $(INSTDIR)/include/m_pd.h +- rm -f $(MANINSTDIR)/man1/pd.1.gz +- rm -f $(MANINSTDIR)/man1/pdsend.1.gz +- rm -f $(MANINSTDIR)/man1/pdreceive.1.gz ++ rm -f -r $(LIBPD_DEST) ++ rm -f $(BIN_DEST)/pd ++ rm -f $(BIN_DEST)/pdsend ++ rm -f $(BIN_DEST)/pdreceive ++ rm -f $(INCLUDE_DEST)/m_pd.h ++ rm -f $(MAN_DEST)/man1/pd.1.gz ++ rm -f $(MAN_DEST)/man1/pdsend.1.gz ++ rm -f $(MAN_DEST)/man1/pdreceive.1.gz + + include makefile.dependencies + diff --git a/packages/patches/darwin/darwin_display_tweaks.patch b/packages/patches/darwin/darwin_display_tweaks.patch new file mode 100644 index 00000000..59771854 --- /dev/null +++ b/packages/patches/darwin/darwin_display_tweaks.patch @@ -0,0 +1,33 @@ +--- ../../pd/src/u_main.tk Thu Jun 9 11:54:59 2005 ++++ build/Pd.app/Contents/Resources/bin/pd.tk Thu Jun 9 16:17:58 2005 +@@ -37,6 +37,12 @@ + if {$pd_nt == 2} { + # turn on James Tittle II's fast drawing (wait until I can test this...): + # set tk::mac::useCGDrawing 1 ++ # set minimun line size for anti-aliasing. If set to 1 or 0, then every ++ # line will be anti-aliased. While this makes connections and circles in ++ # [bng] and such look really good, it makes boxes and messages look out of ++ # focus. Setting this to 2 makes it so the thick audio rate connections ++ # are anti-aliased. 2005-06-09 ++ set tk::mac::CGAntialiasLimit 2 + global pd_guidir + global pd_tearoff + set pd_gui2 [string range $argv0 0 [expr [string last / $argv0 ] - 1]] +@@ -158,7 +164,7 @@ + + + frame .printout +-text .printout.text -relief raised -bd 2 -font -*-courier-bold--normal--12-* \ ++text .printout.text -relief raised -bd 2 -font { courier 12 } \ + -yscrollcommand ".printout.scroll set" -width 80 + # .printout.text insert end "\n\n\n\n\n\n\n\n\n\n" + scrollbar .printout.scroll -command ".printout.text yview" +@@ -337,7 +343,7 @@ + global pd_myversion + set name [format ".help%d" $doc_number] + toplevel $name +- text $name.text -relief raised -bd 2 -font -*-courier-bold--normal--12-* \ ++ text $name.text -relief raised -bd 2 -font { helvetica 14 } \ + -yscrollcommand "$name.scroll set" -background white + scrollbar $name.scroll -command "$name.text yview" + pack $name.scroll -side right -fill y diff --git a/packages/patches/darwin/darwin_jack_weak_linking.patch b/packages/patches/darwin/darwin_jack_weak_linking.patch new file mode 100644 index 00000000..fa0f6601 --- /dev/null +++ b/packages/patches/darwin/darwin_jack_weak_linking.patch @@ -0,0 +1,22 @@ +Index: makefile.in +=================================================================== +RCS file: /cvsroot/pure-data/pd/src/makefile.in,v +retrieving revision 1.8 +diff -u -w -r1.8 makefile.in +--- makefile.in 24 Jul 2005 19:41:14 -0000 1.8 ++++ makefile.in 25 Jul 2005 01:59:05 -0000 +@@ -85,9 +85,12 @@ + $(BIN_DIR)/pdreceive: u_pdreceive.c + $(CC) $(CFLAGS) $(STRIPFLAG) -o $(BIN_DIR)/pdreceive u_pdreceive.c + ++# MACOSX_DEPLOYMENT_TARGET=10.2 is necessary on Mac OS X to support weak ++# linking of frameworks. Since its just a environment variable, it should be ++# safely ignored on other platforms. + $(PDEXEC): $(OBJ) +- cd ../obj; $(CC) $(LDFLAGS) $(DBG_CFLAGS) -o $(PDEXEC) $(OBJ) \ +- $(LIB) ++ cd ../obj; MACOSX_DEPLOYMENT_TARGET=10.2 $(CC) $(LDFLAGS) $(DBG_CFLAGS) \ ++ -o $(PDEXEC) $(OBJ) $(LIB) + + $(BIN_DIR)/pd-gui: $(GOBJ) $(GSRC) + cd ../obj; $(CC) $(INCLUDE) -o $(BIN_DIR)/$(GUINAME) $(GOBJ) \ diff --git a/packages/patches/darwin/darwin_linking_fixes.patch b/packages/patches/darwin/darwin_linking_fixes.patch new file mode 100644 index 00000000..dd1c2db3 --- /dev/null +++ b/packages/patches/darwin/darwin_linking_fixes.patch @@ -0,0 +1,149 @@ +Index: configure.in +=================================================================== +RCS file: /cvsroot/pure-data/pd/src/configure.in,v +retrieving revision 1.10 +diff -u -w -r1.10 configure.in +--- configure.in 30 May 2005 04:37:25 -0000 1.10 ++++ configure.in 7 Jun 2005 00:14:52 -0000 +@@ -13,6 +13,7 @@ + AC_SUBST(USE_DEBUG_CFLAGS, no) + AC_SUBST(SYSSRC) + AC_SUBST(STRIPFLAG) ++AC_SUBST(TCLTK_FRAMEWORKS_PATH) + AC_SUBST(GUINAME) + AC_SUBST(GUIFLAGS) + AC_SUBST(OSNUMBER) +@@ -207,6 +208,24 @@ + OPT_CFLAGS="-g" + else + OPT_CFLAGS="-O6 -funroll-loops -fomit-frame-pointer" ++ ++ if test x$jack == "xyes"; ++ then ++ LDFLAGS=$LDFLAGS" -lrt -ljack" ++ fi ++ if test x$jack == "xrun"; ++ then ++ LDFLAGS=$LDFLAGS" -lrt -ljack" ++ fi ++ fi ++ ++ if test x$jack == "xyes"; ++ then ++ LDFLAGS=$LDFLAGS" -lrt -ljack" ++ fi ++ if test x$jack == "xrun"; ++ then ++ LDFLAGS=$LDFLAGS" -lrt -ljack" + fi + echo OPT_CFLAGS --------------- $OPT_CFLAGS + OSNUMBER=0 +@@ -245,11 +264,25 @@ + ../portmidi/pm_common/portmidi.c \ + ../portmidi/porttime/ptmacosx_cf.c " + STRIPFLAG="" +- GUINAME="pdtcl" +- GUIFLAGS="-F../../Frameworks -framework Tcl -framework Tk \ +- -I../../Frameworks/Tk.framework/Versions/Current/Headers \ +- -I../../Frameworks/Tcl.framework/Versions/Current/Headers \ +- -I../../Frameworks/Tcl.framework/Versions/8.4/PrivateHeaders" ++ GUINAME="libPdTcl.dylib" ++ ++# find the Tcl/Tk Frameworks ++ if test -d "../../Frameworks"; ++ then ++ # Miller's location ++ TCLTK_FRAMEWORKS_PATH="../../Frameworks" ++ elif test -d "/Library/Frameworks"; ++ then ++ # get it from the default install location ++ TCLTK_FRAMEWORKS_PATH="/Library/Frameworks" ++ else ++ # Panther has Tcl here; Tiger has Tcl and Tk here ++ TCLTK_FRAMEWORKS_PATH="/System/Library/Frameworks" ++ fi ++ GUIFLAGS="-F$TCLTK_FRAMEWORKS_PATH -framework Tcl -framework Tk \ ++ -I$TCLTK_FRAMEWORKS_PATH/Tk.framework/Versions/Current/Headers \ ++ -I$TCLTK_FRAMEWORKS_PATH/Tcl.framework/Versions/Current/Headers \ ++ -I$TCLTK_FRAMEWORKS_PATH/Tcl.framework/Versions/8.4/PrivateHeaders" + if test x$USE_DEBUG_CFLAGS == "xyes"; + then + OPT_CFLAGS="-g" +@@ -258,11 +291,14 @@ + fi + OSNUMBER=2 + EXTERNTARGET=pd_darwin ++ + if test x$jack == "xyes"; + then +- LDFLAGS=$LDFLAGS" -framework Jack" +- MORECFLAGS=$MORECFLAGS" -DUSEAPI_JACK" +- SYSSRC=$SYSSRC" s_audio_jack.c" ++ LDFLAGS=$LDFLAGS" -weak_framework Jack" ++ fi ++ if test x$jack == "xrun"; ++ then ++ LDFLAGS=$LDFLAGS" -weak_framework Jack" + fi + fi + +@@ -272,13 +308,11 @@ + then + MORECFLAGS=$MORECFLAGS" -DUSEAPI_JACK" + SYSSRC=$SYSSRC" s_audio_jack.c" +- LDFLAGS=$LDFLAGS" -lrt -ljack" + fi + if test x$jack == "xrun"; + then + MORECFLAGS=$MORECFLAGS" -DUSEAPI_JACK -DJACK_XRUN" + SYSSRC=$SYSSRC" s_audio_jack.c" +- LDFLAGS=$LDFLAGS" -lrt -ljack" + fi + + # extra flags for alpha machines +Index: makefile.in +=================================================================== +RCS file: /cvsroot/pure-data/pd/src/makefile.in,v +retrieving revision 1.6 +diff -u -w -r1.6 makefile.in +--- makefile.in 18 May 2005 04:28:51 -0000 1.6 ++++ makefile.in 7 Jun 2005 00:14:52 -0000 +@@ -97,11 +97,17 @@ + cp u_main.tk $(BIN_DIR)/pd.tk + + #this is for Max OSX only... +-$(BIN_DIR)/pdtcl: $(GOBJ) $(GSRC) +- cd ../obj; libtool -dynamic -o $(BIN_DIR)/pdtcl $(GOBJ) \ +- ../../Frameworks/Tk.framework/Versions/Current/Tk \ +- ../../Frameworks/Tcl.framework/Versions/Current/Tcl \ +- /usr/lib/libSystem.B.dylib ++$(BIN_DIR)/libPdTcl.dylib: $(GOBJ) $(GSRC) ++ cd ../obj && $(CC) -dynamiclib -read_only_relocs warning \ ++ -o $(BIN_DIR)/libPdTcl.dylib $(GOBJ) \ ++ -F@TCLTK_FRAMEWORKS_PATH@ \ ++ -framework Tcl -framework Tk -framework System \ ++ -Wl,-install_name,@executable_path/../Resources/bin/libPdTcl.dylib ++ install_name_tool -change @TCLTK_FRAMEWORKS_PATH@/Tcl.framework/Versions/8.4/Tcl\ ++ @executable_path/../Frameworks/Tcl.framework/Versions/8.4/Tcl \ ++ -change @TCLTK_FRAMEWORKS_PATH@/Tk.framework/Versions/8.4/Tk \ ++ @executable_path/../Frameworks/Tk.framework/Versions/8.4/Tk \ ++ ../bin/libPdTcl.dylib + + externs: + cd ../extra/bonk~;make @EXTERNTARGET@ +Index: u_main.tk +=================================================================== +RCS file: /cvsroot/pure-data/pd/src/u_main.tk,v +retrieving revision 1.9 +diff -u -w -r1.9 u_main.tk +--- u_main.tk 18 May 2005 04:28:51 -0000 1.9 ++++ u_main.tk 7 Jun 2005 00:14:52 -0000 +@@ -48,7 +48,7 @@ + global pd_tearoff + set pd_gui2 [string range $argv0 0 [expr [string last / $argv0 ] - 1]] + set pd_guidir $pd_gui2/.. +- load $pd_guidir/bin/pdtcl ++ load $pd_guidir/bin/libPdTcl.dylib + set pd_tearoff 0 + + # tk::mac::OpenDocument is called with the filenames put into the diff --git a/packages/patches/extended-help-menu.patch b/packages/patches/extended-help-menu.patch new file mode 100644 index 00000000..0cabfeaa --- /dev/null +++ b/packages/patches/extended-help-menu.patch @@ -0,0 +1,174 @@ +Index: u_main.tk +=================================================================== +RCS file: /cvsroot/pure-data/pd/src/u_main.tk,v +--- pd-0.38-4/src/u_main.tk Sun Feb 20 20:03:36 2005 ++++ u_main.tk Wed Nov 16 00:33:02 2005 +@@ -374,22 +374,41 @@ + set help_directory $pd_guidir/doc + set help_top_directory $pd_guidir/doc + ++################## generate_menu_doc_link ######################### ++# This procedure generates a temporary mirror of the documentation directory ++# in /tmp so that it can be opened from the Help->Pure Documentation... menu ++# under Mac OS X. It is meant to be run at startup. ++# Damn you Apple and your "hide stuff from the user" "features". ++# ++proc generate_menu_doc_link {} { ++ global help_directory ++ ++ regsub -all "/" $help_directory "." help_directory_alias ++ set help_directory_alias /tmp/$help_directory_alias ++ set help_directory_tmpdir $help_directory_alias/doc ++ # if something other than a directory exists, delete it ++ if [file exists $help_directory_alias] { ++ file delete -force -- $help_directory_alias ++ } ++ if { ! [ file isdirectory $help_directory_tmpdir ] } { ++ file mkdir $help_directory_tmpdir ++ } ++ foreach file [ lsort [ glob -dir $help_directory * ] ] { ++ regsub -all ".*/" $file "" link_file_name ++ file link -symbolic [file join $help_directory_tmpdir $link_file_name ] $file ++ } ++ set help_directory $help_directory_tmpdir ++} ++ ++################## menu_documentation ######################### + proc menu_documentation {} { + global help_directory + global pd_nt + global pd_guidir + +- if {$pd_nt == 2} { +- exec rm -rf /tmp/pd-documentation +- exec cp -pr $pd_guidir/doc /tmp/pd-documentation +- set filename [tk_getOpenFile -defaultextension .pd \ +- -filetypes { {{documentation} {.pd .txt .htm}} } \ +- -initialdir /tmp/pd-documentation] +- } else { + set filename [tk_getOpenFile -defaultextension .pd \ + -filetypes { {{documentation} {.pd .txt .htm}} } \ + -initialdir $help_directory] +- } + if {$filename != ""} { + if {[string first .txt $filename] >= 0} { + menu_opentext $filename +@@ -411,35 +430,57 @@ + + set dirname $pd_guidir/$subdir + ++ set file_type [file type $dirname/$basename] ++ if { $file_type == "directory" } { ++ pd [concat pd open [pdtk_enquote $basename] \ ++ [pdtk_enquote $dirname] \;] ++ } else { + if {[regexp ".*\.(txt|c)$" $basename]} { + menu_opentext $dirname/$basename ++ } elseif {[regexp ".*\.(pd|max)$" $basename]} { ++ pd [concat pd open [pdtk_enquote $basename] \ ++ [pdtk_enquote $dirname] \;] + } elseif {[regexp ".*\.html?$" $basename]} { + menu_openhtml $dirname/$basename + } else { +- pd [concat pd open [pdtk_enquote $basename] \ +- [pdtk_enquote $dirname] \;] ++ menu_openhtml $dirname/$basename ++ } + } + } + +-proc doc_submenu {helpmenu subdir} { +- global help_top_directory pd_tearoff +- +- set menudir $help_top_directory/$subdir + +- regsub -all "\\\." $subdir "" submenu ++################## menu_doc_submenu ######################### + ++# this is a recursive function to generation a nested menu in the help menu ++# which shows the complete contents of the doc directory ++proc menu_doc_submenu {helpmenu base_dir sub_dir} { ++ global pd_tearoff ++ global help_top_directory ++ ++ set menu_dir $help_top_directory/$base_dir/$sub_dir ++ ++ foreach file [ lsort [ glob -nocomplain -dir $menu_dir * ] ] { ++ set file_type [file type $file] ++ regsub {.*/(.*$)} $file {\1} file_name ++ # If links are going to be used then there needs to be a check to see if each ++ # link might cause this function to recurse forever ++ # if { $file_type == "link"} { ++ # puts stderr "LINK: $file" ++ # } ++ if { $file_type == "file" } { ++ # only put certain file types on the menu ++ if {[regexp ".*\.(htm|html|c|pd|txt|tk|pdf|wav|aif|aiff)$" $file]} { ++ $helpmenu add command -label $file_name \ ++ -command "menu_doc_open doc/$base_dir/$sub_dir $file_name" ++ } ++ } elseif { $file_type == "directory" } { ++ regsub -all "\\\." [string tolower $file_name] "" submenu + menu $helpmenu.$submenu -tearoff $pd_tearoff +- regsub -all "\\\." $subdir " " submenuname ++ regsub -all "\\\." $file_name " " submenuname + $helpmenu add cascade -label $submenuname \ + -menu $helpmenu.$submenu +- +-# use this glob pattern to exclude the supporting files +-# foreach file [ lsort [ glob -dir $menudir {*[0-9][0-9]*} ] ] +- foreach file [ lsort [ glob -dir $menudir * ] ] { +- set filename "" +- regsub {.*/(.*\..+$)} $file {\1} filename +- $helpmenu.$submenu add command -label $filename \ +- -command "menu_doc_open doc/$subdir $filename" ++ menu_doc_submenu $helpmenu.$submenu $base_dir/$sub_dir [file tail $file] ++ } + } + } + +@@ -494,7 +535,18 @@ + + + # the "Help" menu +- if {$pd_nt != 2} { ++ if {$pd_nt == 2} { ++# Apple doesn't allow cascading menus in their Help so I had to call this ++# one "docs" ++ generate_menu_doc_link ++ $mbar.docs add command -label {Browse Documentation...} \ ++ -command {menu_documentation} ++ # the help menu only really works well on Mac OS X ++ $mbar.docs add command -label {Pd HTML Manual...} \ ++ -command {menu_doc_open doc/1.manual index.htm} ++ $mbar.docs add separator ++ menu_doc_submenu $mbar.docs "." "." ++ } else { + # a menu on the main menubar named "$whatever.help" while be treated + # as a special menu with specific behaviors on different platforms. + # See SPECIAL MENUS IN MENUBARS http://www.tcl.tk/man/tcl8.4/TkCmd/menu.htm +@@ -502,22 +554,9 @@ + -command {menu_doc_open doc/1.manual 1.introduction.txt} + $mbar.help add command -label {Pure Documentation...} \ + -command {menu_documentation} +- # add menu items for each section instead of using Pd patches +- $mbar.help add separator +- set helpmenuname help +- } else { +-# Apple doesn't allow cascading menus in their Help so I had to call this +-# one "docs" +- set helpmenuname docs +- } +- +- $mbar.$helpmenuname add command -label {1 manual...} \ ++ $mbar.help add command -label {1 manual...} \ + -command {menu_doc_open doc/1.manual index.htm} +- doc_submenu $mbar.$helpmenuname 2.control.examples +- doc_submenu $mbar.$helpmenuname 3.audio.examples +- doc_submenu $mbar.$helpmenuname 4.fft.examples +- doc_submenu $mbar.$helpmenuname 5.reference +- doc_submenu $mbar.$helpmenuname 6.externs ++ } + } + + #################### the "File" menu for the Pd window ############## diff --git a/packages/patches/libdir-0.38-4.patch b/packages/patches/libdir-0.38-4.patch index c2148c11..3ac2a790 100644 --- a/packages/patches/libdir-0.38-4.patch +++ b/packages/patches/libdir-0.38-4.patch @@ -1,10 +1,11 @@ +? configure Index: s_loader.c =================================================================== RCS file: /cvsroot/pure-data/pd/src/s_loader.c,v retrieving revision 1.4 diff -u -w -r1.4 s_loader.c --- s_loader.c 6 Sep 2004 20:20:35 -0000 1.4 -+++ s_loader.c 20 Nov 2005 01:52:20 -0000 ++++ s_loader.c 20 Nov 2005 03:47:04 -0000 @@ -163,3 +163,82 @@ @@ -94,7 +95,7 @@ RCS file: /cvsroot/pure-data/pd/src/s_main.c,v retrieving revision 1.9.2.5 diff -u -w -r1.9.2.5 s_main.c --- s_main.c 24 Feb 2005 01:37:20 -0000 1.9.2.5 -+++ s_main.c 20 Nov 2005 01:52:20 -0000 ++++ s_main.c 20 Nov 2005 03:47:04 -0000 @@ -233,6 +233,7 @@ /* load dynamic libraries specified with "-lib" args */ for (nl = sys_externlist; nl; nl = nl->nl_next) @@ -109,12 +110,13 @@ RCS file: /cvsroot/pure-data/pd/src/s_stuff.h,v retrieving revision 1.5 diff -u -w -r1.5 s_stuff.h --- s_stuff.h 6 Sep 2004 20:20:36 -0000 1.5 -+++ s_stuff.h 20 Nov 2005 01:52:20 -0000 -@@ -47,6 +47,7 @@ - ++++ s_stuff.h 20 Nov 2005 03:47:04 -0000 +@@ -48,6 +48,8 @@ /* s_loader.c */ int sys_load_lib(char *dirname, char *filename); -+int sys_load_lib_dir(char *dirname, char *filename); ++int sys_load_lib_dir(char *dirname, char *filename); ++ /* s_audio.c */ + #define SENDDACS_NO 0 /* return values for sys_send_dacs() */ diff --git a/packages/patches/loaderHEX-0.39-1.patch b/packages/patches/loaderHEX-0.39-1.patch new file mode 100644 index 00000000..d3656662 --- /dev/null +++ b/packages/patches/loaderHEX-0.39-1.patch @@ -0,0 +1,208 @@ +Index: m_class.c +=================================================================== +RCS file: /cvsroot/pure-data/pd/src/m_class.c,v +retrieving revision 1.4 +diff -u -w -r1.4 m_class.c +--- m_class.c 28 Nov 2004 21:20:42 -0000 1.4 ++++ m_class.c 17 Nov 2005 23:33:06 -0000 +@@ -16,6 +16,7 @@ + + #include + #include ++#include + + static t_symbol *class_loadsym; /* name under which an extern is invoked */ + static void pd_defaultfloat(t_pd *x, t_float f); +@@ -513,6 +514,42 @@ + t_symbol* pathsearch(t_symbol *s,char* ext); + int pd_setloadingabstraction(t_symbol *sym); + ++ ++/* replace everything but [a-zA-Z0-9_] by "0x%x" */ ++static char*alternative_classname(char*classname) ++{ ++ char *altname=(char*)getbytes(sizeof(char)*MAXPDSTRING); ++ int count=0; ++ int i=0; ++ for(i=0; i=48 && c<=57)|| /* [0-9] */ ++ (c>=65 && c<=90)|| /* [A-Z] */ ++ (c>=97 && c<=122)||/* [a-z] */ ++ (c==95)) /* [_] */ ++ { ++ altname[i]=c; ++ i++; ++ } ++ else /* a "bad" character */ ++ { ++ sprintf(altname+i, "0x%02x", c); ++ i+=4; ++ count++; ++ } ++ classname++; ++ } ++ if(count>0)return altname; ++ /* seems like the given classname is fine as can be */ ++ freebytes(altname, sizeof(char)*MAXPDSTRING); ++ return 0; ++} ++ ++ + /* this routine is called when a new "object" is requested whose class Pd + doesn't know. Pd tries to load it as an extern, then as an abstraction. */ + void new_anything(void *dummy, t_symbol *s, int argc, t_atom *argv) +@@ -521,10 +558,11 @@ + t_symbol *dir = canvas_getcurrentdir(); + int fd; + char dirbuf[MAXPDSTRING], *nameptr; ++ char *altname=alternative_classname(s->s_name); + if (tryingalready) return; + newest = 0; + class_loadsym = s; +- if (sys_load_lib(dir->s_name, s->s_name)) ++ if (sys_load_lib_alt(dir->s_name, s->s_name,altname)) + { + tryingalready = 1; + typedmess(dummy, s, argc, argv); +@@ -535,6 +573,8 @@ + current = s__X.s_thing; + if ((fd = open_via_path(dir->s_name, s->s_name, ".pd", + dirbuf, &nameptr, MAXPDSTRING, 0)) >= 0 || ++ (altname && (fd = open_via_path(dir->s_name, altname, ".pd", ++ dirbuf, &nameptr, MAXPDSTRING, 0)) >= 0) || + (fd = open_via_path(dir->s_name, s->s_name, ".pat", + dirbuf, &nameptr, MAXPDSTRING, 0)) >= 0) + { +Index: s_loader.c +=================================================================== +RCS file: /cvsroot/pure-data/pd/src/s_loader.c,v +retrieving revision 1.6 +diff -u -w -r1.6 s_loader.c +--- s_loader.c 30 May 2005 03:04:19 -0000 1.6 ++++ s_loader.c 17 Nov 2005 23:33:07 -0000 +@@ -46,10 +46,11 @@ + + void class_set_extern_dir(t_symbol *s); + +-int sys_load_lib(char *dirname, char *classname) ++int sys_load_lib_alt(char *dirname, char *classname, char*altname) + { + char symname[MAXPDSTRING], filename[MAXPDSTRING], dirbuf[MAXPDSTRING], +- classname2[MAXPDSTRING], *nameptr, *lastdot; ++ classname2[MAXPDSTRING], *nameptr, *lastdot, ++ altsymname[MAXPDSTRING]; + void *dlobj; + t_xxx makeout = NULL; + int fd; +@@ -72,6 +73,25 @@ + if ((fd = open_via_path(dirname, classname2, sys_dllextent, + dirbuf, &nameptr, MAXPDSTRING, 1)) < 0) + { ++ /* next try (alternative_classname).(sys_dllextent) */ ++ if(altname) ++ { ++ if ((fd = open_via_path(dirname, altname, sys_dllextent, ++ dirbuf, &nameptr, MAXPDSTRING, 1)) < 0) ++ ++ /* next try (alternative_classname)/(alternative_classname).(sys_dllextent) ... */ ++ strncpy(classname2, altname, MAXPDSTRING); ++ filename[MAXPDSTRING-2] = 0; ++ strcat(classname2, "/"); ++ strncat(classname2, altname, MAXPDSTRING-strlen(classname2)); ++ filename[MAXPDSTRING-1] = 0; ++ if ((fd = open_via_path(dirname, classname2, sys_dllextent, ++ dirbuf, &nameptr, MAXPDSTRING, 1)) < 0) ++ { ++ return 0; ++ } ++ } ++ else + return (0); + } + } +@@ -93,9 +113,20 @@ + #ifdef MACOSX + strcpy(symname, "_"); + strcat(symname, nameptr); ++ if(altname) ++ { ++ strcpy(altsymname, "_setup_"); ++ strcat(symname, altname); ++ } + #else + strcpy(symname, nameptr); ++ if(altname) ++ { ++ strcpy(altsymname, "setup_"); ++ strcat(altsymname, altname); ++ } + #endif ++ + /* if the last character is a tilde, replace with "_tilde" */ + if (symname[strlen(symname) - 1] == '~') + strcpy(symname + (strlen(symname) - 1), "_tilde"); +@@ -110,6 +141,7 @@ + return (0); + } + makeout = (t_xxx)dlsym(dlobj, symname); ++ if(!makeout)makeout = (t_xxx)dlsym(dlobj, altsymname); + #endif + #ifdef MSW + sys_bashfilename(filename, filename); +@@ -121,6 +153,7 @@ + return (0); + } + makeout = (t_xxx)GetProcAddress(ntdll, symname); ++ if(!makeout)makeout = (t_xxx)GetProcAddress(ntdll, altsymname); + #endif + #ifdef MACOSX + { +@@ -147,6 +180,8 @@ + } + s = NSLookupSymbolInModule(ret, symname); + ++ if(!s)s=NSLookupSymbolInModule(ret, altsymname); ++ + if (s) + makeout = (t_xxx)NSAddressOfSymbol( s); + else makeout = 0; +@@ -156,6 +191,8 @@ + if (!makeout) + { + post("load_object: Symbol \"%s\" not found", symname); ++ if(altname) ++ post("load_object: Symbol \"%s\" not found", altsymname); + class_set_extern_dir(&s_); + return 0; + } +@@ -164,6 +201,10 @@ + return (1); + } + ++int sys_load_lib(char *dirname, char *filename) ++{ ++ return sys_load_lib_alt(dirname, filename, 0); ++} + + + +Index: s_stuff.h +=================================================================== +RCS file: /cvsroot/pure-data/pd/src/s_stuff.h,v +retrieving revision 1.7 +diff -u -w -r1.7 s_stuff.h +--- s_stuff.h 16 Jul 2005 01:43:18 -0000 1.7 ++++ s_stuff.h 17 Nov 2005 23:33:07 -0000 +@@ -47,6 +47,7 @@ + + /* s_loader.c */ + int sys_load_lib(char *dirname, char *filename); ++int sys_load_lib_alt(char *dirname, char *filename, char* altname); + + /* s_audio.c */ + diff --git a/packages/patches/win/NT2_MSC_VER.patch b/packages/patches/win/NT2_MSC_VER.patch new file mode 100644 index 00000000..7c5f3d25 --- /dev/null +++ b/packages/patches/win/NT2_MSC_VER.patch @@ -0,0 +1,59 @@ +? configure +Index: d_mayer_fft.c +=================================================================== +RCS file: /cvsroot/pure-data/pd/src/d_mayer_fft.c,v +retrieving revision 1.3 +diff -u -w -r1.3 d_mayer_fft.c +--- d_mayer_fft.c 18 May 2005 04:28:50 -0000 1.3 ++++ d_mayer_fft.c 17 Nov 2005 23:29:25 -0000 +@@ -48,7 +48,8 @@ + * of work. -msp + */ + +-#ifdef MSW ++/* These pragmas are only used for MSVC, not MinGW or Cygwin */ ++#ifdef _MSC_VER + #pragma warning( disable : 4305 ) /* uncast const double to float */ + #pragma warning( disable : 4244 ) /* uncast double to float */ + #pragma warning( disable : 4101 ) /* unused local variables */ +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 17 Nov 2005 23:29:25 -0000 +@@ -17,12 +17,13 @@ + #define MSW + #endif + +-#ifdef MSW ++/* These pragmas are only used for MSVC, not MinGW or Cygwin */ ++#ifdef _MSC_VER + /* #pragma warning( disable : 4091 ) */ + #pragma warning( disable : 4305 ) /* uncast const double to float */ + #pragma warning( disable : 4244 ) /* uncast float/int conversion etc. */ + #pragma warning( disable : 4101 ) /* unused automatic variables */ +-#endif /* MSW */ ++#endif /* _MSC_VER */ + + /* the external storage class is "extern" in UNIX; in MSW it's ugly. */ + #ifdef MSW +Index: t_tkcmd.c +=================================================================== +RCS file: /cvsroot/pure-data/pd/src/t_tkcmd.c,v +retrieving revision 1.6 +diff -u -w -r1.6 t_tkcmd.c +--- t_tkcmd.c 15 Oct 2005 23:14:28 -0000 1.6 ++++ t_tkcmd.c 17 Nov 2005 23:29:25 -0000 +@@ -30,7 +30,9 @@ + #include + #include + #endif +-#ifdef MSW ++ ++/* These pragmas are only used for MSVC, not MinGW or Cygwin */ ++#ifdef _MSC_VER + #pragma warning( disable : 4305 ) /* uncast const double to float */ + #pragma warning( disable : 4244 ) /* uncast double to float */ + #pragma warning( disable : 4101 ) /* unused local variables */ diff --git a/packages/win32_inno/TODO b/packages/win32_inno/TODO index b152c85d..5557f83a 100644 --- a/packages/win32_inno/TODO +++ b/packages/win32_inno/TODO @@ -3,4 +3,4 @@ - get Windows Makefiles for cyclone, toxy, zexy, Gem, unauthorized - +- change license file to GPL -- cgit v1.2.1