summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorP. J. McDermott <pjm@nac.net>2013-09-21 22:54:17 (EDT)
committer P. J. McDermott <pjm@nac.net>2013-09-21 22:56:24 (EDT)
commit089454ba2b3e42c02bea28c88768287b3c17f596 (patch)
tree0e1056427cc56f1fde84f5832257066d2f51c7c7
parent64ef181299ffb7bb3d55cb8b1ddc6e2349f02bd0 (diff)
source.mk: Remove zlib copy (non-free RFCs).
-rw-r--r--source.mk17
1 files changed, 12 insertions, 5 deletions
diff --git a/source.mk b/source.mk
index 9ca5fb6..0556187 100644
--- a/source.mk
+++ b/source.mk
@@ -1,11 +1,18 @@
+# Tcl embeds a copy of zlib, but zlib has some non-free RFCs. Since Tcl can be
+# built with the system zlib, just remove the whole embedded copy.
+
+upstream_ver = $$(printf '%s\n' '$(OPK_SOURCE_VERSION_UPSTREAM)' | \
+ sed 's/^\([0-9a-z.~-][0-9a-z.~-]*\)+sip[1-9][0-9]*.*$$/\1/')
upstream_sf_base = http://downloads.sourceforge.net/project/tcl
-upstream_path = Tcl/$(OPK_SOURCE_VERSION_UPSTREAM)
-upstream_archive = tcl-core$(OPK_SOURCE_VERSION_UPSTREAM)-src.tar.gz
-upstream_url = $(upstream_sf_base)/$(upstream_path)/$(upstream_archive)
+upstream_archive = tcl-core$(upstream_ver)-src.tar.gz
+upstream_url = $(upstream_sf_base)/Tcl/$(upstream_ver)/$(upstream_archive)
source_archive = ../$(OPK_SOURCE)-$(OPK_SOURCE_VERSION_UPSTREAM).orig.tar.gz
$(source_archive):
- wget '$(upstream_url)'
- mv '$(upstream_archive)' '$(source_archive)'
+ wget -O - "$(upstream_url)" | tar -xz
+ rm -Rf "tcl$(upstream_ver)/compat/zlib"
+ tar -czf '$(source_archive)' "tcl$(upstream_ver)"
+ rm -Rf src
+ mv "tcl$(upstream_ver)" src
source: $(source_archive)