lmi-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lmi-commits] (no subject)


From: Greg Chicares
Subject: [lmi-commits] (no subject)
Date: Wed, 13 Jul 2016 16:24:31 +0000 (UTC)

branch: master
commit b6cbdeeeb406727ae96c2d28a5a137e9b1bf341c
Author: Gregory W. Chicares <address@hidden>
Date:   Wed Jul 13 16:20:58 2016 +0000

    Prepare to upgrade libxml2 and libxslt
    
    This makefile has not changed substantially since it was first committed
    a decade ago. The present revisions facilitate a pending upgrade.
    
    Older versions were hosted at gnome.org and provided as either .tar.bz2
    or .tar.gz files, with md5sum files, in a multi-level hierarchy. Newer
    versions are hosted at xmlsoft.org, which offers only .tar.gz archives
    (in a single directory), with no md5sums (gpg signatures are provided,
    but lmi does not yet use them).
    
    Newer versions need the compiler's bin directory in PATH.
---
 install_libxml2_libxslt.make |   91 +++++++++++++++++++++++++++---------------
 1 file changed, 58 insertions(+), 33 deletions(-)

diff --git a/install_libxml2_libxslt.make b/install_libxml2_libxslt.make
index 6370574..89a9c80 100644
--- a/install_libxml2_libxslt.make
+++ b/install_libxml2_libxslt.make
@@ -1,4 +1,4 @@
-# Install msw-native libxml2 and libxslt with options suitable for lmi.
+# Install libxml2 and libxslt with options suitable for lmi.
 #
 # Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 
2016 Gregory W. Chicares.
 #
@@ -21,13 +21,41 @@
 
 # Configurable settings 
########################################################
 
+# Archives and their md5sums
+
+libxml2_version = libxml2-2.6.26
+libxslt_version = libxslt-1.1.17
+#libxml2_version = libxml2-2.9.4
+#libxslt_version = libxslt-1.1.29
+
+libxml2_archive := $(libxml2_version).tar.gz
+libxslt_archive := $(libxslt_version).tar.gz
+
+libxml2-2.6.26.tar.gz-md5 := 2d8d3805041edab967368b497642f981
+libxslt-1.1.17.tar.gz-md5 := fde6a7a93c0eb14cba628692fa3a1000
+libxml2-2.9.4.tar.gz-md5  := ae249165c173b1ff386ee8ad676815f5
+libxslt-1.1.29.tar.gz-md5 := a129d3c44c022de3b9dcf6d6f288d72e
+
 # Libraries are ordered by dependency, rather than alphabetically.
 source_archives := \
-  libxml2/2.6/libxml2-2.6.26.tar.bz2 \
-  libxslt/1.1/libxslt-1.1.17.tar.bz2 \
+  $(libxml2_archive) \
+  $(libxslt_archive) \
+
+# libxslt requires a roughly contemporary libxml2
+$(libxslt_version): $(libxml2_version)
 
-host          := ftp://ftp.gnome.org
-host_path     := pub/GNOME/sources
+# 'ftp://xmlsoft.org' has 'libxml2/' and 'libxslt/' subdirectories,
+# but they seem to be identical: the latter is apparently a link to
+# the former, so only the former is used here.
+
+host          := ftp://xmlsoft.org
+host_path     := libxml2
+
+# Expunge this soon.
+libxml2-2.6.26.tar.gz: host := ftp://ftp.gnome.org
+libxslt-1.1.17.tar.gz: host := ftp://ftp.gnome.org
+libxml2-2.6.26.tar.gz: host_path := pub/GNOME/sources/libxml2/2.6
+libxslt-1.1.17.tar.gz: host_path := pub/GNOME/sources/libxslt/1.1
 
 mingw_dir     := /MinGW_
 
@@ -73,7 +101,15 @@ common_options := \
     STRIP='$(mingw_bin_dir)/strip' \
   WINDRES='$(mingw_bin_dir)/windres' \
 
-libxml2-2.6.26_options := \
+$(libxml2_version)_options := \
+  $(common_options) \
+  --with-schemas \
+  --without-iconv \
+  --without-modules \
+  --without-schematron \
+
+# Expunge this workaround soon.
+libxml2-2.6.26: $(libxml2_version)_options := \
   $(common_options) \
   --with-schemas \
   --without-iconv \
@@ -82,7 +118,7 @@ libxml2-2.6.26_options := \
   --without-threads \
   --without-zlib \
 
-libxslt-1.1.17_options := \
+$(libxslt_version)_options := \
   $(common_options) \
   --with-libxml-prefix=$(prefix) \
   --without-crypto \
@@ -100,7 +136,7 @@ WGET   := wget
 
 # Targets 
######################################################################
 
-libraries := $(source_archives:.tar.bz2=)
+libraries := $(libxml2_version) $(libxslt_version)
 
 .PHONY: all
 all: clobber $(source_archives) $(libraries)
@@ -112,16 +148,17 @@ initial_setup: clobber
 
 .PHONY: initial_setup
 initial_setup:
-       @$(MKDIR) --parents $(prefix)
-       @$(MKDIR) --parents $(cache_dir)
-       @$(MKDIR) --parents $(xml_dir)
+       $(MKDIR) --parents $(prefix)
+       $(MKDIR) --parents $(cache_dir)
+       $(MKDIR) --parents $(xml_dir)
 
-WGETFLAGS := \
+# Expunge old versions, then restore these two assignments: s/=/:=/
+WGETFLAGS = \
   --cut-dirs=$(words $(subst /, ,$(host_path))) \
   --force-directories \
   --no-host-directories \
 
-wget_whence := $(host)/$(host_path)
+wget_whence = $(host)/$(host_path)
 
 TARFLAGS := --keep-old-files
 %.tar.bz2: TARFLAGS += --bzip2
@@ -129,40 +166,28 @@ TARFLAGS := --keep-old-files
 
 .PHONY: %.tar.bz2 %.tar.gz
 %.tar.bz2 %.tar.gz:
-       cd $(cache_dir) && [ -e $*.md5sum ] || $(WGET) $(WGETFLAGS) 
$(wget_whence)/$*.md5sum
-       cd $(cache_dir) && [ -e $@        ] || $(WGET) $(WGETFLAGS) 
$(wget_whence)/$@
+       cd $(cache_dir) && [ -e $@ ] || $(WGET) $(WGETFLAGS) $(wget_whence)/$@
        cd $(cache_dir)/$(dir $@) && \
-         $(GREP) $(notdir $@) $(notdir $*).md5sum | $(MD5SUM) --check --status 
-
+         $(ECHO) "$(address@hidden) *$@" | $(MD5SUM) --check
        $(TAR) --extract $(TARFLAGS) --directory=$(xml_dir) 
--file=$(cache_dir)/$@
 
-# Someday it may be necessary to add these variables to this recipe:
+# Someday it may be necessary to add a line like this to the recipe:
 #   export lt_cv_to_tool_file_cmd=func_convert_file_cygwin_to_w32
-#   export PATH="/path/to/MinGW/bin:${PATH}"
 # but that's not necessary for now. See:
 #   http://lists.nongnu.org/archive/html/lmi/2011-06/msg00025.html
 
 .PHONY: $(libraries)
 $(libraries):
-       cd $(xml_dir)/$(notdir $@) \
-         && ./configure --prefix=$(prefix) $($(notdir $@)_options) \
+       -[ -e address@hidden ] && $(PATCH) --directory=$(xml_dir) --strip=1 
<address@hidden
+       cd $(xml_dir)/$@ \
+         && export PATH="$(mingw_bin_dir):${PATH}" \
+         && ./configure --prefix=$(prefix) $(address@hidden) \
          && $(MAKE) \
          && $(MAKE) install \
 
-.PHONY: libxslt/1.1/libxslt-1.1.17
-libxslt/1.1/libxslt-1.1.17: patch_libxslt
-libxslt/1.1/libxslt-1.1.17: libxml2/2.6/libxml2-2.6.26
-
-# Patches 
######################################################################
-
-# libxslt-1.1.17.patch
-
-.PHONY: patch_libxslt
-patch_libxslt: libxslt/1.1/libxslt-1.1.17.tar.bz2
-       $(PATCH) --directory=$(xml_dir) --strip=1 < libxslt-1.1.17-lmi.patch
-
 .PHONY: clobber
 clobber:
-       -for z in $(notdir $(libraries)); \
+       -for z in $(libraries); \
          do \
            cd $(xml_dir)/$$z && $(MAKE) uninstall maintainer-clean; \
            $(RM) --recursive $(xml_dir)/$$z; \



reply via email to

[Prev in Thread] Current Thread [Next in Thread]