diff options
-rw-r--r-- | source.mk | 17 |
1 files changed, 12 insertions, 5 deletions
@@ -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) |