[PD-dev] flext

dmotd inaudible at simplesuperlativ.es
Tue Jun 29 03:50:59 CEST 2010


hi hans,

the work i've done slots straight into the existing
externals/Makefile structure and currently builds fine on
linux, it uses thomas' build system and until a better
autoconf alternative is created, this is by far the easiest
(and has been working quite well for years). as such this a
multi-class single lib system.

i have followed the libdir rules, with help-files
abstraction (and in py/ext case scriptets) in each libs own
dir, and other stuff in examples. the actual flext headers
and libs get installed in their own $prefix/include
$prefix/lib.

my intention is to get the flext externals into the nightly
autobuid. i'm not sure what you mean by 'distribuited as
stand-alone', if this is a reference to your plan to split
supported pd-extended libs into individual packages, then
i'll need to know more about what scripts you have at your
disposal and your release schedule for this new packaging
system.

i've attached a diff of my working makefile, which will need
to be tested against other platforms and linux
distributions. currently the following libs build and
install correctly: absattr, pool, py, xsample (i am waitinng
on some fixes up stream for clk and vasp)

sorry for not emailing earlier, i've had little time to work
on this stuff and just ran with the momentum with the small
time i have had.

cheers,
dmotd

Hans-Christoph Steiner wrote:
> 
> Hey, I just saw you are working flext stuff, lots of people will
> appreciate that.  I don't know your plan, but I wanted to save you
> some effort.  At this point, I think that the flext stuff should be
> distributed as standalone libraries, rather than integrated with Pd-
> extended.  That makes it easier to package too, for things like
> archlinux, Debian, Fedora, etc.
> 
> Also, if you are starting in on packaging things for archlinux,
> check out the externals/template.  If you can make a template
> archlinux packaging file for that, then it'll be really easy to make
> packages for all of the libraries that use that template:
> 
> http://puredata.info/docs/developer/MakefileTemplate
> 
> .hc
> 
> ----------------------------------------------------------------------------
> 
> News is what people want to keep hidden and everything else is
> publicity.          - Bill Moyers
> 
> 
-------------- next part --------------
--- externals/Makefile (rev 13687)	2010-06-18 14:25:23.000000000 +1000
+++ externals/Makefile (flext)	2010-06-28 12:17:11.000000000 +1000
@@ -128,7 +128,7 @@
 #
 # WARNING!  this MUST be all on one line because the automatic package
 # building scripts rely on it being that way.
-LIB_TARGETS = adaptive bassemu boids bsaylor creb cxc cyclone earplug ekext ext13 flashserver flatspace flib freeverb ggee hcs iem_ambi iem_bin_ambi iemlib iemgui iemguts iem_adaptfilt iemmatrix iemxmlrpc iem_delay iem_roomsim iem_spec2 iem_tab jasch_lib loaders mapping markex maxlib mjlib moocow moonlib motex mrpeach oscx pan pdcontainer pddp pdogg pmpd sigpack smlib tof toxy unauthorized vanilla vbap windowing zexy
+LIB_TARGETS = adaptive absattr bassemu boids bsaylor clk creb cxc cyclone earplug ekext ext13 flashserver flatspace flib freeverb ggee hcs iem_ambi iem_bin_ambi iemlib iemgui iemguts iem_adaptfilt iemmatrix iemxmlrpc iem_delay iem_roomsim iem_spec2 iem_tab jasch_lib loaders mapping markex maxlib mjlib moocow moonlib motex mrpeach oscx pan pdcontainer pddp pdogg pmpd pool py sigpack smlib tof toxy unauthorized vanilla vbap windowing xsample zexy
 
 # this is for libraries that don't compile (yet) on all platforms
 ifeq ($(OS_NAME),windows)
@@ -2339,6 +2339,184 @@
 earplug_clean:
 	make -C $(externals_src)/earplug~ clean
 
+#------------------------------------------------------------------------------#
+# FLEXT
+FLEXT_NAME = flext
+ifeq ($(OS_NAME),windows)
+  FLEXT_CONFIG = buildsys/config-win-pd-gcc.txt
+  FLEXT_CFLAGS = $(OPT_CFLAGS) $(CFLAGS) 
+else
+  ifeq ($(OS_NAME),darwin)
+    FLEXT_CONFIG = buildsys/config-mac-pd-gcc.txt
+  else
+    ifeq ($(OS_NAME),linux)
+      FLEXT_CONFIG = buildsys/config-lnx-pd-gcc.txt
+    else
+      FLEXT_CFLAGS = $(OPT_CFLAGS) $(CFLAGS) 
+    endif
+  endif
+endif
+
+FLEXT_OUTPATH =$(shell grep OUTPATH= $(externals_src)/grill/flext/$(FLEXT_CONFIG) | sed s/^OUTPATH=//)
+
+$(externals_src)/grill/flext/$(FLEXT_CONFIG):
+	-cd $(externals_src)/grill/flext && ./build.sh pd gcc
+
+flext-edit-config: $(externals_src)/grill/flext/$(FLEXT_CONFIG)
+	sed -i -e 's|^\(PDPATH=\).*|\1$(pd_src)|' -e 's|^\(FLEXTPREFIX=\).*|\1$(DESTDIR)$(prefix)|' -e 's|^\(INSTPATH=\).*|\1$(DESTDIR)$(objectsdir)/$(FLEXT_NAME)|' -e 's|^\(UFLAGS=\).*|\1$(CFLAGS) $(OPT_CFLAGS)|' -e 's|^\(OFLAGS=\).*|\1|' -e 's|^\(OFLAGS+=\).*|\1|' $(externals_src)/grill/flext/$(FLEXT_CONFIG)
+
+
+flext-edit-simd: 
+	-cd $(externals_src)/grill/flext && ./build.sh pd gcc
+	touch $(externals_src)/grill/flext/config.txt
+
+flext: flext-edit-config flext-edit-simd
+	cd $(externals_src)/grill/flext && ./build.sh pd gcc build
+
+flext_install: flext
+	cd $(externals_src)/grill/flext && ./build.sh pd gcc install
+
+flext_clean:
+	cd $(externals_src)/grill/flext && ./build.sh pd gcc clean
+
+#------------------------------------------------------------------------------#
+# VASP
+VASP_NAME=vasp 
+vasp: flext_install
+	cd $(externals_src)/grill/vasp && $(externals_src)/grill/flext/build.sh pd gcc build
+
+vasp_install: vasp
+#	cd $(externals_src)/grill/vasp && $(externals_src)/grill/flext/build.sh pd gcc install
+	install -d $(DESTDIR)$(objectsdir)/$(VASP_NAME)
+	$(scripts_src)/generate-libdir-metafile.sh $(DESTDIR)$(objectsdir) $(VASP_NAME) \
+		--author "Thomas Grill <gr at grrrr.org>" \
+		--license "GNU GPL" \
+		--description "VASP modular - vector assembling signal processor"
+	install -p $(externals_src)/grill/vasp/$(FLEXT_OUTPATH)/release-multi/vasp.$(EXTENSION) $(DESTDIR)$(objectsdir)/$(VASP_NAME)
+	install -p $(externals_src)/grill/vasp/pd-help/*.pd $(DESTDIR)$(objectsdir)/$(VASP_NAME)
+	install -d $(DESTDIR)$(examplesdir)/$(VASP_NAME)
+	install -p $(externals_src)/grill/vasp/pd/*.pd \
+		$(externals_src)/grill/vasp/pd/*.aif \
+		$(externals_src)/grill/vasp/pd-ex/*.pd \
+		$(DESTDIR)$(examplesdir)/$(VASP_NAME)
+
+vasp_clean:
+	cd $(externals_src)/grill/vasp && $(externals_src)/grill/flext/build.sh pd gcc clean 
+
+#------------------------------------------------------------------------------#
+# XSAMPLE
+XSAMPLE_NAME=xsample 
+xsample: flext_install
+	cd $(externals_src)/grill/xsample && $(externals_src)/grill/flext/build.sh pd gcc build
+
+xsample_install: xsample
+#	cd $(externals_src)/grill/xsample && $(externals_src)/grill/flext/build.sh pd gcc install
+	install -d $(DESTDIR)$(objectsdir)/$(XSAMPLE_NAME)
+	$(scripts_src)/generate-libdir-metafile.sh $(DESTDIR)$(objectsdir) $(XSAMPLE_NAME) \
+		--author "Thomas Grill <gr at grrrr.org>" \
+		--license "GNU GPL" \
+		--description "xsample - extended sample objects for Max/MSP and PD"
+	install -p $(externals_src)/grill/xsample/$(FLEXT_OUTPATH)/release-single/xsample.$(EXTENSION) $(DESTDIR)$(objectsdir)/$(XSAMPLE_NAME)
+	install -p $(externals_src)/grill/xsample/pd/*.pd $(DESTDIR)$(objectsdir)/$(XSAMPLE_NAME)
+	install -d $(DESTDIR)$(examplesdir)/$(XSAMPLE_NAME)
+	install -p $(externals_src)/grill/xsample/pd-ex/*.pd \
+		$(DESTDIR)$(examplesdir)/$(XSAMPLE_NAME)
+
+xsample_clean:
+	cd $(externals_src)/grill/xsample && $(externals_src)/grill/flext/build.sh pd gcc clean 
+
+#------------------------------------------------------------------------------#
+# POOL
+POOL_NAME=pool 
+pool: flext_install
+	cd $(externals_src)/grill/pool && $(externals_src)/grill/flext/build.sh pd gcc build
+
+pool_install: pool
+#	cd $(externals_src)/grill/pool && $(externals_src)/grill/flext/build.sh pd gcc install
+	install -d $(DESTDIR)$(objectsdir)/$(POOL_NAME)
+	$(scripts_src)/generate-libdir-metafile.sh $(DESTDIR)$(objectsdir) $(POOL_NAME) \
+		--author "Thomas Grill <gr at grrrr.org>" \
+		--license "GNU GPL" \
+		--description "pool - a hierarchical storage object for PD and Max/MSP"
+	install -p $(externals_src)/grill/pool/$(FLEXT_OUTPATH)/release-single/pool.$(EXTENSION) $(DESTDIR)$(objectsdir)/$(POOL_NAME)
+	install -p $(externals_src)/grill/pool/*.pd $(DESTDIR)$(objectsdir)/$(POOL_NAME)
+
+pool_clean:
+	cd $(externals_src)/grill/pool && $(externals_src)/grill/flext/build.sh pd gcc clean 
+
+#------------------------------------------------------------------------------#
+# PY
+PY_NAME=py
+PYTHON_VERSION := $(shell python -c 'import sys; print sys.version[:3]')
+PYTHON_PREFIX := $(shell python-config --prefix)
+NUMPY := $(shell python -c "exec(\"try:\\n  import numpy\\n  print 'True'\\nexcept ImportError:\\n  print 'False'\")")
+NUMERIC := $(shell python -c "exec(\"try:\\n  import Numeric\\n  print 'True'\\nexcept ImportError:\\n  print 'False'\")")
+NUMARRAY := $(shell python -c "exec(\"try:\\n  import numarray\\n  print 'True'\\nexcept ImportError:\\n  print 'False'\")")
+
+$(externals_src)/grill/py/config.txt:
+	-cd $(externals_src)/grill/py && $(externals_src)/grill/flext/build.sh pd gcc build
+	if [ $(NUMPY) == "True" ] ; then echo "NUMPY default!"; elif [ $(NUMERIC) == "True" ] ; then sed -i -e "s|^\(PY_NUMPY.*\)|\#\1|" -e "s|^\#[[:space:]]\(PY_NUMERIC.*\)|\1|" $(externals_src)/grill/py/config.txt; elif [ $(NUMARRAY) == "True" ] ; then sed -i -e "s|^\(PY_NUMPY.*\)|\#\1|" -e "s|^\#[[:space:]]\(PY_NUMARRAY.*\)|\1|" $(externals_src)/grill/py/config.txt; else sed -i "s|^\(PY_NUMPY.*\)|\#\1|" $(externals_src)/grill/py/config.txt; fi
+	sed -i "s|^\(PYTHONVERSION=\).*|\1$(PYTHON_VERSION)|" $(externals_src)/grill/py/config.txt
+	sed -i "s|^\(PYTHONPREFIX=\).*|\1$(PYTHON_PREFIX)|" $(externals_src)/grill/py/config.txt
+	cat $(externals_src)/grill/py/config.txt
+
+py: flext_install $(externals_src)/grill/py/config.txt
+	cd $(externals_src)/grill/py && $(externals_src)/grill/flext/build.sh pd gcc build
+
+py_install: py 
+#	cd $(externals_src)/grill/py && $(externals_src)/grill/flext/build.sh pd gcc install
+	install -d $(DESTDIR)$(objectsdir)/$(PY_NAME)
+	$(scripts_src)/generate-libdir-metafile.sh $(DESTDIR)$(objectsdir) $(PY_NAME) \
+		--author "Thomas Grill <gr at grrrr.org>" \
+		--license "GNU GPL" \
+		--description "py/pyext - python script objects for PD and Max/MSP"
+	install -p $(externals_src)/grill/py/$(FLEXT_OUTPATH)/release-multi/py.$(EXTENSION) $(DESTDIR)$(objectsdir)/$(PY_NAME)
+	install -p $(externals_src)/grill/py/scripts/*.py $(DESTDIR)$(objectsdir)/$(PY_NAME)
+	install -d $(DESTDIR)$(examplesdir)/$(PY_NAME)
+	install -p $(externals_src)/grill/py/pd/*.pd $(DESTDIR)$(examplesdir)/$(PY_NAME)
+
+py_clean:
+	cd $(externals_src)/grill/py && $(externals_src)/grill/flext/build.sh pd gcc clean 
+
+#------------------------------------------------------------------------------#
+# ABSATTR
+ABSATTR_NAME=absattr
+absattr: flext_install
+	cd $(externals_src)/grill/absattr && $(externals_src)/grill/flext/build.sh pd gcc build
+
+absattr_install: absattr
+#	cd $(externals_src)/grill/absattr && $(externals_src)/grill/flext/build.sh pd gcc install
+	install -d $(DESTDIR)$(objectsdir)/$(ABSATTR_NAME)
+	$(scripts_src)/generate-libdir-metafile.sh $(DESTDIR)$(objectsdir) $(ABSATTR_NAME) \
+		--author "Thomas Grill <gr at grrrr.org>" \
+		--license "GNU GPL" \
+		--description "absattr - patcher attributes"
+	install -p $(externals_src)/grill/absattr/$(FLEXT_OUTPATH)/release-single/absattr.$(EXTENSION) $(DESTDIR)$(objectsdir)/$(ABSATTR_NAME)
+	install -p $(externals_src)/grill/absattr/*.pd $(DESTDIR)$(objectsdir)/$(ABSATTR_NAME)
+
+absattr_clean:
+	cd $(externals_src)/grill/absattr && $(externals_src)/grill/flext/build.sh pd gcc clean 
+
+#------------------------------------------------------------------------------#
+# CLK
+CLK_NAME=clk
+clk: flext_install
+	cd $(externals_src)/grill/clk && $(externals_src)/grill/flext/build.sh pd gcc build
+
+clk_install: clk
+#	cd $(externals_src)/grill/clk && $(externals_src)/grill/flext/build.sh pd gcc install
+	install -d $(DESTDIR)$(objectsdir)/$(CLK_NAME)
+	$(scripts_src)/generate-libdir-metafile.sh $(DESTDIR)$(objectsdir) $(CLK_NAME) \
+		--author "Thomas Grill <gr at grrrr.org>" \
+		--license "GNU GPL" \
+		--description "clk - syncable clocking objects"
+	install -p $(externals_src)/grill/clk/$(FLEXT_OUTPATH)/release-single/clk.$(EXTENSION) $(DESTDIR)$(objectsdir)/$(CLK_NAME)
+	install -p $(externals_src)/grill/clk/*.pd $(DESTDIR)$(objectsdir)/$(CLK_NAME)
+
+clk_clean:
+	cd $(externals_src)/grill/clk && $(externals_src)/grill/flext/build.sh pd gcc clean 
+
+
 
 
 #==============================================================================#


More information about the Pd-dev mailing list