Browse Source

* renamed zip to unzip

peter 24 years ago
parent
commit
914baf2fa0

+ 116 - 6
packages/zip/Makefile → packages/unzip/Makefile

@@ -115,6 +115,12 @@ endif
 override FPCDIR:=$(wildcard $(FPCDIR))
 override FPCDIR:=$(wildcard $(FPCDIR))
 UNITSDIR=$(wildcard $(FPCDIR)/units/$(OS_TARGET))
 UNITSDIR=$(wildcard $(FPCDIR)/units/$(OS_TARGET))
 PACKAGESDIR=$(wildcard $(FPCDIR) $(FPCDIR)/packages)
 PACKAGESDIR=$(wildcard $(FPCDIR) $(FPCDIR)/packages)
+override PACKAGE_NAME=unzip
+override PACKAGE_VERSION=1.0.5
+override TARGET_UNITS+=ziptypes unzip
+ifeq ($(OS_TARGET),os2)
+override TARGET_UNITS+=unzipdll
+endif
 ifndef ECHO
 ifndef ECHO
 ECHO:=$(strip $(wildcard $(addsuffix /gecho$(EXEEXT),$(SEARCHPATH))))
 ECHO:=$(strip $(wildcard $(addsuffix /gecho$(EXEEXT),$(SEARCHPATH))))
 ifeq ($(ECHO),)
 ifeq ($(ECHO),)
@@ -410,6 +416,35 @@ endif
 ifndef INSTALL_DATADIR
 ifndef INSTALL_DATADIR
 INSTALL_DATADIR=$(INSTALL_BASEDIR)
 INSTALL_DATADIR=$(INSTALL_BASEDIR)
 endif
 endif
+REQUIRE_PACKAGES_RTL=1
+ifdef REQUIRE_PACKAGES_RTL
+PACKAGEDIR_RTL:=$(subst /Makefile.fpc,,$(strip $(wildcard $(addsuffix /rtl/Makefile.fpc,$(PACKAGESDIR)))))
+ifneq ($(PACKAGEDIR_RTL),)
+PACKAGEDIR_RTL:=$(firstword $(PACKAGEDIR_RTL))
+ifeq ($(wildcard $(PACKAGEDIR_RTL)/$(FPCMADE)),)
+override COMPILEPACKAGES+=package_rtl
+package_rtl:
+	$(MAKE) -C $(PACKAGEDIR_RTL) all
+endif
+ifneq ($(wildcard $(PACKAGEDIR_RTL)/$(OS_TARGET)),)
+UNITDIR_RTL=$(PACKAGEDIR_RTL)/$(OS_TARGET)
+else
+UNITDIR_RTL=$(PACKAGEDIR_RTL)
+endif
+else
+PACKAGEDIR_RTL=
+UNITDIR_RTL:=$(subst /Package.fpc,,$(strip $(wildcard $(addsuffix /rtl/Package.fpc,$(UNITSDIR)))))
+ifneq ($(UNITDIR_RTL),)
+UNITDIR_RTL:=$(firstword $(UNITDIR_RTL))
+else
+UNITDIR_RTL=
+endif
+endif
+ifdef UNITDIR_RTL
+override COMPILER_UNITDIR+=$(UNITDIR_RTL)
+endif
+endif
+.PHONY: package_rtl
 override FPCOPTDEF=$(CPU_TARGET)
 override FPCOPTDEF=$(CPU_TARGET)
 ifneq ($(OS_TARGET),$(OS_SOURCE))
 ifneq ($(OS_TARGET),$(OS_SOURCE))
 override FPCOPT+=-T$(OS_TARGET)
 override FPCOPT+=-T$(OS_TARGET)
@@ -507,6 +542,14 @@ ifeq ($(OS_SOURCE),$(OS_TARGET))
 EXECPPAS:=@$(PPAS)
 EXECPPAS:=@$(PPAS)
 endif
 endif
 endif
 endif
+.PHONY: fpc_units
+ifdef TARGET_UNITS
+override ALLTARGET+=fpc_units
+override UNITPPUFILES=$(addsuffix $(PPUEXT),$(TARGET_UNITS))
+override INSTALLPPUFILES+=$(UNITPPUFILES)
+override CLEANPPUFILES+=$(UNITPPUFILES)
+endif
+fpc_units: $(UNITPPUFILES)
 .PHONY: fpc_packages fpc_all fpc_smart fpc_debug
 .PHONY: fpc_packages fpc_all fpc_smart fpc_debug
 $(FPCMADE): $(ALLTARGET)
 $(FPCMADE): $(ALLTARGET)
 	@$(ECHO) Compiled > $(FPCMADE)
 	@$(ECHO) Compiled > $(FPCMADE)
@@ -589,6 +632,75 @@ endif
 	$(COPYTREE) $(addsuffix /*,$(TARGET_EXAMPLEDIRS)) $(INSTALL_EXAMPLEDIR)
 	$(COPYTREE) $(addsuffix /*,$(TARGET_EXAMPLEDIRS)) $(INSTALL_EXAMPLEDIR)
 endif
 endif
 fpc_distinstall: fpc_install fpc_exampleinstall
 fpc_distinstall: fpc_install fpc_exampleinstall
+.PHONY: fpc_zipinstall fpc_zipsourceinstall fpc_zipexampleinstall
+ifndef PACKDIR
+ifndef inUnix
+PACKDIR=$(BASEDIR)/../pack_tmp/$(PACKAGE_NAME)
+else
+PACKDIR=/tmp/fpc-pack/$(PACKAGE_NAME)
+endif
+endif
+ifndef ZIPNAME
+ifdef DIST_ZIPNAME
+ZIPNAME=$(DIST_ZIPNAME)
+else
+ZIPNAME=$(ZIPPREFIX)$(PACKAGE_NAME)$(ZIPSUFFIX)
+endif
+endif
+ifndef ZIPTARGET
+ifdef DIST_ZIPTARGET
+ZIPTARGET=DIST_ZIPTARGET
+else
+ZIPTARGET=install
+endif
+endif
+ifndef USEZIP
+ifdef inUnix
+USETAR=1
+endif
+endif
+ifdef inOS2
+USEZIPWRAPPER=1
+endif
+ZIPWRAPPER=$(DIST_DESTDIR)/fpczip$(BATCHEXT)
+ZIPCMD_CDPACK:=cd $(subst /,$(PATHSEP),$(PACKDIR))
+ZIPCMD_CDBASE:=cd $(subst /,$(PATHSEP),$(BASEDIR))
+ifdef USETAR
+ZIPDESTFILE:=$(DIST_DESTDIR)/$(ZIPNAME)$(TAREXT)
+ZIPCMD_ZIP:=$(TARPROG) cf$(TAROPT) $(ZIPDESTFILE) *
+else
+ZIPDESTFILE:=$(DIST_DESTDIR)/$(ZIPNAME)$(ZIPEXT)
+ZIPCMD_ZIP:=$(subst /,$(PATHSEP),$(ZIPPROG)) -Dr $(ZIPOPT) $(ZIPDESTFILE) *
+endif
+fpc_zipinstall:
+	$(MAKE) $(ZIPTARGET) INSTALL_PREFIX=$(PACKDIR) ZIPINSTALL=1
+	$(DEL) $(ZIPDESTFILE)
+ifdef USEZIPWRAPPER
+ifneq ($(ECHO),echo)
+	$(ECHO) "$(ZIPCMD_CDPACK)" > $(ZIPWRAPPER)
+	$(ECHO) "$(ZIPCMD_ZIP)" >> $(ZIPWRAPPER)
+	$(ECHO) "$(ZIPCMD_CDBASE)" >> $(ZIPWRAPPER)
+else
+	$(ECHO) $(ZIPCMD_CDPACK) > $(ZIPWRAPPER)
+	$(ECHO) $(ZIPCMD_ZIP) >> $(ZIPWRAPPER)
+	$(ECHO) $(ZIPCMD_CDBASE) >> $(ZIPWRAPPER)
+endif
+ifdef inUnix
+	/bin/sh $(ZIPWRAPPER)
+else
+	$(ZIPWRAPPER)
+endif
+	$(DEL) $(ZIPWRAPPER)
+else
+	$(ZIPCMD_CDPACK) ; $(ZIPCMD_ZIP) ; $(ZIPCMD_CDBASE)
+endif
+	$(DELTREE) $(PACKDIR)
+fpc_zipsourceinstall:
+	$(MAKE) fpc_zipinstall ZIPTARGET=sourceinstall ZIPSUFFIX=src
+fpc_zipexampleinstall:
+	$(MAKE) fpc_zipinstall ZIPTARGET=exampleinstall ZIPSUFFIX=exm
+fpc_zipdistinstall:
+	$(MAKE) fpc_zipinstall ZIPTARGET=distinstall
 .PHONY: fpc_clean fpc_cleanall fpc_distclean
 .PHONY: fpc_clean fpc_cleanall fpc_distclean
 ifdef EXEFILES
 ifdef EXEFILES
 override CLEANEXEFILES:=$(addprefix $(TARGETDIRPREFIX),$(CLEANEXEFILES))
 override CLEANEXEFILES:=$(addprefix $(TARGETDIRPREFIX),$(CLEANEXEFILES))
@@ -713,10 +825,10 @@ install: fpc_install
 sourceinstall: fpc_sourceinstall
 sourceinstall: fpc_sourceinstall
 exampleinstall: fpc_exampleinstall
 exampleinstall: fpc_exampleinstall
 distinstall: fpc_distinstall
 distinstall: fpc_distinstall
-zipinstall:
-zipsourceinstall:
-zipexampleinstall:
-zipdistinstall:
+zipinstall: fpc_zipinstall
+zipsourceinstall: fpc_zipsourceinstall
+zipexampleinstall: fpc_zipexampleinstall
+zipdistinstall: fpc_zipdistinstall
 clean: fpc_clean
 clean: fpc_clean
 distclean: fpc_distclean
 distclean: fpc_distclean
 cleanall: fpc_cleanall
 cleanall: fpc_cleanall
@@ -725,5 +837,3 @@ info: fpc_info
 ifneq ($(wildcard fpcmake.loc),)
 ifneq ($(wildcard fpcmake.loc),)
 include fpcmake.loc
 include fpcmake.loc
 endif
 endif
-unzip$(PPUEXT): unzip$(PASEXT) ziptypes$(PPUEXT)
-unzipdll$(PPUEXT):  unzipdll$(PASEXT) ziptypes$(PPUEXT)

+ 11 - 0
packages/unzip/Makefile.fpc

@@ -0,0 +1,11 @@
+#
+#   Makefile.fpc for Unzip
+#
+
+[package]
+name=unzip
+version=1.0.5
+
+[target]
+units=ziptypes unzip
+units_os2=unzipdll

+ 4 - 1
packages/zip/unzip.pas → packages/unzip/unzip.pp

@@ -3331,7 +3331,10 @@ BEGIN
 END.
 END.
 {
 {
   $Log$
   $Log$
-  Revision 1.1  2000-07-13 06:34:24  michael
+  Revision 1.1  2001-01-30 19:26:18  peter
+    * renamed zip to unzip
+
+  Revision 1.1  2000/07/13 06:34:24  michael
   + Initial import
   + Initial import
 
 
   Revision 1.1  2000/03/02 12:16:56  michael
   Revision 1.1  2000/03/02 12:16:56  michael

+ 4 - 1
packages/zip/unzipdll.pas → packages/unzip/unzipdll.pp

@@ -228,7 +228,10 @@ begin
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.2  2000-12-19 00:51:10  hajny
+  Revision 1.1  2001-01-30 19:26:18  peter
+    * renamed zip to unzip
+
+  Revision 1.2  2000/12/19 00:51:10  hajny
     * modifications from /install/fpinst merged in
     * modifications from /install/fpinst merged in
 
 
   Revision 1.1  2000/07/13 06:34:24  michael
   Revision 1.1  2000/07/13 06:34:24  michael

+ 4 - 1
packages/zip/ziptypes.pas → packages/unzip/ziptypes.pp

@@ -202,7 +202,10 @@ END;
 END.
 END.
 {
 {
   $Log$
   $Log$
-  Revision 1.1  2000-07-13 06:34:24  michael
+  Revision 1.1  2001-01-30 19:26:18  peter
+    * renamed zip to unzip
+
+  Revision 1.1  2000/07/13 06:34:24  michael
   + Initial import
   + Initial import
 
 
   Revision 1.1  2000/03/02 12:16:57  michael
   Revision 1.1  2000/03/02 12:16:57  michael

+ 0 - 15
packages/zip/Makefile.fpc

@@ -1,15 +0,0 @@
-#
-#   Makefile.fpc for ZLib (LibC version)
-#
-
-[targets]
-units=ziptypes unzip
-units_os2=unzipdll
-
-[dirs]
-fpcdir=../..
-
-[rules]
-unzip$(PPUEXT): unzip$(PASEXT) ziptypes$(PPUEXT)
-
-unzipdll$(PPUEXT):  unzipdll$(PASEXT) ziptypes$(PPUEXT)