changeset 3562:22353d2d21d1

Merge branch 'gub' of git+ssh://git.sv.gnu.org/srv/git/lilypond into gub
author Jan Nieuwenhuizen <janneke@gnu.org>
date Fri, 01 Jun 2007 09:51:34 +0200
parents 8cece346ae10 (current diff) 9880c1606ff6 (diff)
children 3dada34ec71e
files
diffstat 17 files changed, 261 insertions(+), 54 deletions(-) [+]
line wrap: on
line diff
--- a/bin/gpkg	Wed May 30 09:54:33 2007 +0200
+++ b/bin/gpkg	Fri Jun 01 09:51:34 2007 +0200
@@ -123,10 +123,11 @@
     for (command, doc) in commands:
         p.usage += "    %s - %s\n" % (re.sub ('_', '-', command), doc)
 
-    p.add_option ('-B', '--branch',
+    p.add_option ('-B', '--branch', action='append',
+                  dest='branches',
                   default=[],
-                  dest='branches',
-                  help="PACKAGE=VC-BRANCH settings to use")
+                  metavar='NAME=BRANCH',
+                  help='select branch')
 
     p.add_option ('-p', '--platform',
                   default=None,
--- a/gub/cygwin.py	Wed May 30 09:54:33 2007 +0200
+++ b/gub/cygwin.py	Fri Jun 01 09:51:34 2007 +0200
@@ -239,6 +239,11 @@
     'libfontconfig-devel',
     'fontconfig-devel',
     ]
+freetype_source = [
+    'freetype2',
+    'libfreetype26',
+    'libfreetype2-devel',
+    ]
 libtool_source = [
     'libltdl3',
     'libtool',
@@ -250,7 +255,7 @@
     def __init__ (self, settings):
         self.settings = settings
         self.packages = {}
-        self.source = fontconfig_source + guile_source + libtool_source
+        self.source = fontconfig_source + freetype_source + guile_source + libtool_source
         self.load_packages ()
         
     def grok_setup_ini (self, file, skip=[]):
@@ -298,8 +303,11 @@
     'expat-devel': ['expat'],
     'fontconfig-runtime' : ['libfontconfig1'],
     'fontconfig-devel' : ['libfontconfig-devel'],
-    'freetype' : ['libfreetype26'],
+    'freetype' : ['freetype2'],
     'freetype-devel' : ['libfreetype2-devel'],
+    'freetype-runtime' : ['libfreetype26'],
+    'freetype2-devel' : ['libfreetype2-devel'],
+    'freetype2-runtime' : ['libfreetype26'],
     'gettext' : ['libintl8', 'libintl3'],
     'gmp-devel': ['gmp'],
     'guile-runtime' : ['libguile17', 'libguile12'],
--- a/gub/specs/fontconfig.py	Wed May 30 09:54:33 2007 +0200
+++ b/gub/specs/fontconfig.py	Fri Jun 01 09:51:34 2007 +0200
@@ -32,6 +32,12 @@
         ## UGH  - this breaks  on Darwin!
         ## UGH2 - the added /cross/ breaks Cygwin; possibly need
         ## Freetype_config package (see Guile_config, Python_config)
+
+        # FIXME: this is broken.  for a sane target development package,
+        # we want /usr/bin/fontconfig-config must survive.
+        # While cross building, we create an  <toolprefix>-fontconfig-config
+        # and prefer that.
+
         return (targetpackage.TargetBuildSpec.configure_command (self) 
                 + misc.join_lines ('''
 --with-arch=%(target_architecture)s
@@ -138,6 +144,7 @@
     def __init__ (self, settings):
         Fontconfig.__init__ (self, settings)
         self.with_template (mirror=mirrors.fontconfig, version='2.4.1')
+        self.so_version = '1'
 
     def get_subpackage_definitions (self):
         d = dict (Fontconfig.get_subpackage_definitions (self))
@@ -151,7 +158,8 @@
         return ['devel', 'runtime', '']
 
     def get_build_dependencies (self):
-        return ['libtool', 'libfreetype2-devel', 'expat']
+        #        return ['libtool', 'libfreetype2-devel', 'expat']
+        return ['libtool', 'freetype2', 'expat']
     
     def get_dependency_dict (self):
         return {
--- a/gub/specs/freetype.py	Wed May 30 09:54:33 2007 +0200
+++ b/gub/specs/freetype.py	Fri Jun 01 09:51:34 2007 +0200
@@ -4,6 +4,13 @@
 from gub import toolpackage
 
 class Freetype (targetpackage.TargetBuildSpec):
+    '''Software font engine
+FreeType is a software font engine that is designed to be small,
+efficient, highly customizable and portable while capable of producing
+high-quality output (glyph images). It can be used in graphics
+libraries, display servers, font conversion tools, text image generation
+tools, and many other products as well.'''
+
     def __init__ (self, settings):
         targetpackage.TargetBuildSpec.__init__ (self, settings)
         self.with_template (version='2.1.10', mirror=mirrors.nongnu_savannah)
@@ -41,6 +48,10 @@
 
     def install (self):
         targetpackage.TargetBuildSpec.install (self)
+        # FIXME: this is broken.  for a sane target development package,
+        # we want /usr/bin/freetype-config must survive.
+        # While cross building, we create an  <toolprefix>-freetype-config
+        # and prefer that.
         self.system ('mkdir -p %(install_root)s/usr/cross/bin/')
         self.system ('mv %(install_root)s/usr/bin/freetype-config %(install_root)s/usr/cross/bin/freetype-config')
         self.munge_ft_config ('%(install_root)s/usr/cross/bin/freetype-config')
@@ -55,6 +66,67 @@
              '%(builddir)s/Makefile',
              mode='a')
 
+class Freetype__cygwin (Freetype):
+    def __init__ (self, settings):
+        Freetype.__init__ (self, settings)
+        self.with_template (version='2.1.10', mirror=mirrors.nongnu_savannah)
+        self.so_version = '6'
+
+    def patch (self):
+        Freetype.patch (self)
+        self.system ('cd %(srcdir)s && patch -p1 < %(patchdir)s/freetype-libtool-no-version.patch')
+
+    def get_subpackage_definitions (self):
+        d = dict (Freetype.get_subpackage_definitions (self))
+        # urg, must remove usr/share. Because there is no doc package,
+        # runtime iso '' otherwise gets all docs.
+        d['runtime'] = ['/usr/bin/*dll', '/usr/lib/*.la']
+        return d
+
+    def get_subpackage_names (self):
+        #return ['devel', 'doc', '']
+        return ['devel', 'runtime', '']
+
+    def get_build_dependencies (self):
+        return ['libtool']
+    
+    def get_dependency_dict (self):
+        return {
+            '': ['libfreetype26'],
+            'devel': ['libfreetype26'],
+            'runtime': ['zlib'],
+            }
+
+    def category_dict (self):
+        return {'': 'libs',
+                'runtime': 'libs',
+                'devel': 'devel libs',
+                'doc': 'doc'}
+
+    def description_dict (self):
+        # FIXME: fairly uninformative description for packages,
+        # unlike, eg, guile-devel.  This is easier, though.
+        d = {}
+        for i in self.get_subpackage_names ():
+            d[i] = self.get_subpackage_doc (i)
+        return d
+
+    def get_subpackage_doc (self, split):
+        flavor = {'': 'executables',
+                  'devel': 'development',
+                  'doc': 'documentation',
+                  'runtime': 'runtime'}[split]
+        return (Freetype.__doc__.replace ('\n', ' - %(flavor)s\n', 1)
+                % locals ())
+
+    def configure_command (self):
+        return (Freetype.configure_command (self)
+                + ' --sysconfdir=/etc --localstatedir=/var')
+
+    def install (self):
+        targetpackage.TargetBuildSpec.install (self)
+        self.pre_install_smurf_exe ()
+
 class Freetype__local (toolpackage.ToolBuildSpec, Freetype):
     def __init__ (self, settings):
         toolpackage.ToolBuildSpec.__init__ (self, settings)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/gub/specs/freetype2.py	Fri Jun 01 09:51:34 2007 +0200
@@ -0,0 +1,9 @@
+from gub import mirrors
+from gub.specs import freetype
+
+class Freetype2__cygwin (freetype.Freetype__cygwin):
+    def __init__ (self, settings):
+        freetype.Freetype__cygwin.__init__ (self, settings)
+        self.with_template (version='2.1.10',
+                            mirror=mirrors.nongnu_savannah,
+                            name='freetype')
--- a/gub/specs/git.py	Wed May 30 09:54:33 2007 +0200
+++ b/gub/specs/git.py	Fri Jun 01 09:51:34 2007 +0200
@@ -8,7 +8,12 @@
         self.with_template (mirror='http://kernel.org/pub/software/scm/git/git-%(version)s.tar.bz2',
                    version='1.5.1.4')
     def patch (self):
-        self.system('cd %(srcdir)s && git reset --hard HEAD')
+# huh? reset in a tarball dir?
+# invoking cd /home/janneke/vc/gub/target/local/gubfiles/src/git-1.5.1.4 && git reset --hard HEAD
+# fatal: Not a git repository: '.git'
+# Command barfed: cd /home/janneke/vc/gub/target/local/gubfiles/src/git-1.5.1.4 && git reset --hard HEAD
+
+        self.system ('echo NOT "cd %(srcdir)s && git reset --hard HEAD"')
         self.shadow_tree ('%(srcdir)s', '%(builddir)s')
         self.file_sub ([('git describe','true')],
                        '%(srcdir)s/GIT-VERSION-GEN')
--- a/gub/specs/guile.py	Wed May 30 09:54:33 2007 +0200
+++ b/gub/specs/guile.py	Fri Jun 01 09:51:34 2007 +0200
@@ -271,6 +271,9 @@
         self.with_template (version='1.8.1', mirror=mirrors.gnu, format='gz')
         self.so_version = '17'
 
+    def patch (self):
+        self.system ('cd %(srcdir)s && patch -p0 < %(patchdir)s/guile-1.8-rational.patch')
+
     # Using gub dependencies only would be nice, but
     # we need to a lot of gup.gub_to_distro_deps ().
     def GUB_get_dependency_dict (self):
@@ -323,9 +326,6 @@
             ],
                '%(builddir)s/guile-readline/libtool')
 
-    def patch (self):
-        pass
-
     # FIXME: we do most of this for all cygwin packages
     def category_dict (self):
         return {'': 'interpreters',
--- a/gub/specs/lilypond.py	Wed May 30 09:54:33 2007 +0200
+++ b/gub/specs/lilypond.py	Fri Jun 01 09:51:34 2007 +0200
@@ -203,8 +203,8 @@
             [
             'glib2',
             'guile-runtime',
-            'fontconfig-runtime', ## 'libfontconfig1',
-            'libfreetype26',
+            'fontconfig-runtime', ## CYGWIN name: 'libfontconfig1',
+            'freetype2-runtime', ## CYGWIN name: 'libfreetype26',
             'libiconv2',
             'libintl8', 'libintl3',
             'pango-runtime',
@@ -249,8 +249,8 @@
             ##'guile-devel',
             'guile',
             'python',
-            'fontconfig', ##'libfontconfig-devel',
-            'libfreetype2-devel',
+            'fontconfig', ## CYGWIN: 'libfontconfig-devel',
+            'freetype2', ## CYGWIN: 'libfreetype2-devel',
             # cygwin bug: pango-devel should depend on glib2-devel
             'pango-devel', 'glib2-devel',
             'urw-fonts'] + [
--- a/gub/specs/python-config.py	Wed May 30 09:54:33 2007 +0200
+++ b/gub/specs/python-config.py	Fri Jun 01 09:51:34 2007 +0200
@@ -20,3 +20,9 @@
         self.dump (cfg, '%(install_root)s/usr/cross/bin/python-config',
                    expand_string=False)
         self.system ('chmod +x %(install_root)s/usr/cross/bin/python-config')
+
+class Python_config__cygwin (Python_config):
+    def __init__ (self, settings):
+        gubb.SdkBuildSpec.__init__ (self, settings)
+        self.has_source = False
+        self.with_template (version='2.5')
--- a/lilypond.make	Wed May 30 09:54:33 2007 +0200
+++ b/lilypond.make	Fri Jun 01 09:51:34 2007 +0200
@@ -4,15 +4,17 @@
 .PHONY: darwin-ppc darwin-x86 freebsd4-x86 freebsd6-x86 linux-x86 mingw
 .PHONY: bootstrap-download bootstrap
 .PHONY: unlocked-update-versions update-versions download print-success
-.PHONY: cygwin-libtool cygwin-libtool-installer cygwin-fontconfig
-.PHONY: cygwin-fontconfig-installer cygwin-guile cygwin-guile-installer
-.PHONY: cygwin-lilypond cygwin-lilypond-installer upload-setup-ini darwin-ppc
 .PHONY: debian linux-ppc mingw mipsel clean realclean clean-distccd
 .PHONY: local-distcc cross-compilers cross-distccd native-distccd
 .PHONY: bootstrap-git download-local local local-cross-tools doc-clean
 .PHONY: unlocked-doc-clean unlocked-doc-build unlocked-info-man-build
 .PHONY: unlocked-doc-export doc-export unlocked-dist-check dist-check
 
+.PHONY: cygwin-libtool cygwin-libtool-installer cygwin-fontconfig
+.PHONY: cygwin-freetype2 cygwin-freetype2-installer
+.PHONY: cygwin-fontconfig-installer cygwin-guile cygwin-guile-installer
+.PHONY: cygwin-lilypond cygwin-lilypond-installer upload-setup-ini darwin-ppc
+
 default: all
 
 PACKAGE = lilypond
@@ -76,6 +78,7 @@
 
 unlocked-update-versions:
 	python gub/versiondb.py --dbfile $(LILYPOND_VERSIONS) --download  --platforms="$(PLATFORMS)"
+	python gub/versiondb.py --dbfile uploads/freetype2.versions --download  --platforms="$(PLATFORMS)"
 	python gub/versiondb.py --dbfile uploads/fontconfig.versions --download  --platforms="$(PLATFORMS)"
 	python gub/versiondb.py --dbfile uploads/guile.versions --download --platforms="$(PLATFORMS)"
 	python gub/versiondb.py --dbfile uploads/libtool.versions --download --platforms="$(PLATFORMS)"
@@ -126,10 +129,24 @@
 cygwin-libtool-installer:
 	$(CYGWIN_PACKAGER) libtool
 
-cygwin-fontconfig:
+cygwin-freetype2:
+	# when forcing a source build we remove everything,
+	# because freetype by default comes from cygwin as a binary
 	rm -f uploads/cygwin/setup.ini
 	rm -rf target/cygwin/
-	$(call INVOKE_GUP, cygwin) install gcc
+	$(call INVOKE_GUP, cygwin) install cross/gcc
+#	$(call INVOKE_GUB,cygwin) freetype-config
+	$(call INVOKE_GUB,cygwin) --build-source freetype2
+
+cygwin-freetype2-installer:
+	$(CYGWIN_PACKAGER) freetype2
+
+cygwin-fontconfig:
+	# when forcing a source build we remove everything,
+	# because fontconfig by default comes from cygwin as a binary
+	rm -f uploads/cygwin/setup.ini
+	rm -rf target/cygwin/
+	$(call INVOKE_GUP, cygwin) install cross/gcc
 	$(call INVOKE_GUB,cygwin) --build-source fontconfig
 
 cygwin-fontconfig-installer:
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/patches/freetype-libtool-no-version.patch	Fri Jun 01 09:51:34 2007 +0200
@@ -0,0 +1,13 @@
+This fixes building of the dll on Cygwin.
+
+--- ./builds/unix/unix-cc.in~	2003-11-09 09:37:13.000000000 +0100
++++ ./builds/unix/unix-cc.in	2007-05-30 14:34:33.000000000 +0200
+@@ -93,7 +93,7 @@
+ # Library linking
+ #
+ LINK_LIBRARY = $(LIBTOOL) --mode=link $(CCraw) -o $@ $(OBJECTS_LIST) \
+-                          -rpath $(libdir) -version-info $(version_info) \
++                          -rpath $(libdir) -no-undefined -version-info $(version_info) \
+                           $(LDFLAGS)
+ 
+ 
--- a/sourcefiles/fontconfig.README	Wed May 30 09:54:33 2007 +0200
+++ b/sourcefiles/fontconfig.README	Fri Jun 01 09:51:34 2007 +0200
@@ -30,27 +30,24 @@
 Build Instructions:
 
   # Download GUB
-
-    darcs get http://lilypond.org/people/hanwen/gub
+    mkdir gub
     cd gub
-
-  # Populate download cache
-
-    ./gub-builder.py -p cygwin download fontconfig
+    git init
+    git pull git://git.sv.gnu.org/lilypond.git gub:
 
-  # Build fontconfig for cygwin
+  # Build Fontconfig for Cygwin
 
-    ./gub-builder.py -p cygwin build fontconfig
+    bin/gub -p cygwin fontconfig
 
-  # Package fontconfig for cygwin
+  # Package Fontconfig for Cygwin
 
-    ./installer-builder.py -p cygwin build-all fontconfig
+    bin/cygwin-packager fontconfig
 
 This will create:
    uploads/cygwin/release/fontconfig-%(version)s-%(build)s-src.tar.bz2
    uploads/cygwin/release/fontconfig-%(version)s-%(build)s.tar.bz2
-   uploads/cygwin/release/libfontconfig-dev/libfontconfig-dev-%(version)s-%(build)s.tar.bz2
-   uploads/cygwin/release/libfontconfig%(so_version)s/libfontconfig(so_version)s-%(version)s-%(build)s.tar.bz2
+   uploads/cygwin/release/libfontconfig-devel/libfontconfig-devel-%(version)s-%(build)s.tar.bz2
+   uploads/cygwin/release/libfontconfig%(so_version)s/libfontconfig%(so_version)s-%(version)s-%(build)s.tar.bz2
 
 To find out the files included in the binary distribution, you can use
 "cygcheck -l bash", or browse the listing for the appropriate version
@@ -63,7 +60,7 @@
 %(changelog)s
 
   These packages were built on GNU/Linux using GUB, see
-      http://lilypond.org/vc/gub.darcs/READ-ME
+    http://git.sv.gnu.org/gitweb/?p=lilypond.git;a=blob_plain;f=README;hb=gub
 
 Cygwin port maintained by: Jan Nieuwenhuizen  <janneke@gnu.org>
 Please address all questions to the Cygwin mailing list at <cygwin@cygwin.com>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sourcefiles/freetype2.README	Fri Jun 01 09:51:34 2007 +0200
@@ -0,0 +1,65 @@
+Freetype2
+------------------------------------------
+Software font engine
+
+Runtime requirements (these or newer):
+  cygwin-1.5.18
+  libfreetype2%(so_version)s-%(version)s-%(build)s
+
+Build requirements (these or newer):
+  cygwin-1.5.18
+  gcc-3.4.4-1
+  libtool1.5
+  zlib
+
+Canonical homepage:
+  http://www.freetype.org
+
+Canonical download:
+  http://download.savannah.nongnu.org/releases/freetype
+
+License:
+  GPL, docs/GPL.TXT
+
+Language:
+  C
+
+------------------------------------
+
+Build Instructions:
+
+  # Download GUB
+    mkdir gub
+    cd gub
+    git init
+    git pull git://git.sv.gnu.org/lilypond.git gub:
+
+  # Build Freetype for Cygwin
+
+    bin/gub -p cygwin freetype2
+
+  # Package Freetype for Cygwin
+
+    bin/cygwin-packager freetype2
+
+This will create:
+   uploads/cygwin/release/freetype2-%(version)s-%(build)s-src.tar.bz2
+   uploads/cygwin/release/freetype2-%(version)s-%(build)s.tar.bz2
+   uploads/cygwin/release/libfreetype2-devel/libfreetype2-devel-%(version)s-%(build)s.tar.bz2
+   uploads/cygwin/release/libfreetype2%(so_version)s/libfreetype2%(so_version)s-%(version)s-%(build)s.tar.bz2
+
+To find out the files included in the binary distribution, you can use
+"cygcheck -l bash", or browse the listing for the appropriate version
+at <http://cygwin.com/packages/>.
+
+------------------
+
+Port notes:
+
+%(changelog)s
+
+  These packages were built on GNU/Linux using GUB, see
+    http://git.sv.gnu.org/gitweb/?p=lilypond.git;a=blob_plain;f=README;hb=gub
+
+Cygwin port maintained by: Jan Nieuwenhuizen  <janneke@gnu.org>
+Please address all questions to the Cygwin mailing list at <cygwin@cygwin.com>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sourcefiles/freetype2.changelog	Fri Jun 01 09:51:34 2007 +0200
@@ -0,0 +1,6 @@
+freetype2 (2.1.10-1) unstable; urgency=low
+
+  * New maintainer.
+  * Initial.
+
+ -- Jan Nieuwenhuizen <janneke@gnu.org>  Wed, 30 May 2007 20:57:23 +0200
--- a/sourcefiles/guile.README	Wed May 30 09:54:33 2007 +0200
+++ b/sourcefiles/guile.README	Fri Jun 01 09:51:34 2007 +0200
@@ -39,21 +39,18 @@
 Build Instructions:
 
   # Download GUB
-
-    darcs get http://lilypond.org/people/hanwen/gub
+    mkdir gub
     cd gub
-
-  # Populate download cache
-
-    ./gub-builder.py -p cygwin download guile
+    git init
+    git pull git://git.sv.gnu.org/lilypond.git gub:
 
-  # Build guile for cygwin
+  # Build Guile for Cygwin
 
-    ./gub-builder.py -p cygwin build guile
+    bin/gub -p cygwin guile
 
-  # Package guile for cygwin
+  # Package Guile for Cygwin
 
-   ./installer-builder.py -p cygwin build-all guile
+    bin/cygwin-packager guile
 
 This will create:
    uploads/cygwin/release/guile-%(version)s-%(build)s-src.tar.bz2
@@ -73,7 +70,7 @@
 %(changelog)s
 
   These packages were built on GNU/Linux using GUB, see
-      http://lilypond.org/vc/gub.darcs/READ-ME
+    http://git.sv.gnu.org/gitweb/?p=lilypond.git;a=blob_plain;f=README;hb=gub
 
 Cygwin port maintained by: Jan Nieuwenhuizen  <janneke@gnu.org>
 Please address all questions to the Cygwin mailing list at <cygwin@cygwin.com>
--- a/sourcefiles/guile.changelog	Wed May 30 09:54:33 2007 +0200
+++ b/sourcefiles/guile.changelog	Fri Jun 01 09:51:34 2007 +0200
@@ -1,3 +1,9 @@
+guile (1.8.1-7) unstable; urgency=low
+
+  * Apply guile-1.8-rational patch.
+
+ -- Jan Nieuwenhuizen <janneke@gnu.org>  Wed, 30 May 2007 21:04:44 +0200
+
 guile (1.8.1-6) unstable; urgency=low
 
   * Also build static libraries for cygwin.
--- a/sourcefiles/lilypond.README	Wed May 30 09:54:33 2007 +0200
+++ b/sourcefiles/lilypond.README	Fri Jun 01 09:51:34 2007 +0200
@@ -61,21 +61,18 @@
 Build Instructions:
 
   # Download GUB
-
-    darcs get http://lilypond.org/people/hanwen/gub
+    mkdir gub
     cd gub
-
-  # Populate download cache
-
-    ./gub-builder.py -p cygwin download lilypond
+    git init
+    git pull git://git.sv.gnu.org/lilypond.git gub:
 
-  # Build lilypond for cygwin
+  # Build LilyPond for Cygwin
 
-    ./gub-builder.py -p cygwin build lilypond
+    bin/gub -p cygwin lilypond
 
-  # Package lilypond for cygwin
+  # Package LilyPond for Cygwin
 
-   ./installer-builder.py -p cygwin build-all lilypond
+    bin/cygwin-packager lilypond
 
 This will create:
    uploads/cygwin/release/lilypond-%(version)s-%(build)s-src.tar.bz2
@@ -93,7 +90,7 @@
 %(changelog)s
 
   These packages were built on GNU/Linux using GUB, see
-      http://lilypond.org/vc/gub.darcs/READ-ME
+    http://git.sv.gnu.org/gitweb/?p=lilypond.git;a=blob_plain;f=README;hb=gub
    
 Cygwin port maintained by: Jan Nieuwenhuizen  <janneke@gnu.org>
 Please address all questions to the Cygwin mailing list at <cygwin@cygwin.com>