* Build jni package.

git-svn-id: trunk@24142 -
This commit is contained in:
yury 2013-04-03 19:19:39 +00:00
parent 4fd80b88ab
commit 853ecde8f9
6 changed files with 2346 additions and 0 deletions

3
.gitattributes vendored
View File

@ -4216,6 +4216,9 @@ packages/imlib/Makefile.fpc.fpcmake svneol=native#text/plain
packages/imlib/fpmake.pp svneol=native#text/plain
packages/imlib/src/gdk_imlib.pp svneol=native#text/plain
packages/imlib/src/imlib.pp svneol=native#text/plain
packages/jni/Makefile svneol=native#text/plain
packages/jni/Makefile.fpc svneol=native#text/plain
packages/jni/fpmake.pp svneol=native#text/plain
packages/jni/src/jni.pas svneol=native#text/plain
packages/ldap/Makefile svneol=native#text/plain
packages/ldap/Makefile.fpc svneol=native#text/plain

View File

@ -52,6 +52,7 @@
add_iconvenc;
add_imagemagick;
add_imlib;
add_jni;
add_ldap;
add_libc;
add_libcurl;

View File

@ -302,6 +302,12 @@ begin
{$include imlib/fpmake.pp}
end;
procedure add_jni;
begin
with Installer do
{$include jni/fpmake.pp}
end;
procedure add_ldap;
begin
with Installer do

2209
packages/jni/Makefile Normal file

File diff suppressed because it is too large Load Diff

89
packages/jni/Makefile.fpc Normal file
View File

@ -0,0 +1,89 @@
#
# Makefile.fpc for running fpmake
#
[package]
name=jni
version=2.7.1
[require]
packages=rtl fpmkunit
[install]
fpcpackage=y
[default]
fpcdir=../..
[prerules]
FPMAKE_BIN_CLEAN=$(wildcard .$(PATHSEP)fpmake$(SRCEXEEXT))
ifdef OS_TARGET
FPC_TARGETOPT+=--os=$(OS_TARGET)
endif
ifdef CPU_TARGET
FPC_TARGETOPT+=--cpu=$(CPU_TARGET)
endif
LOCALFPMAKE=.$(PATHSEP)fpmake$(SRCEXEEXT)
[rules]
# Do not pass the Makefile's unit and binary target locations. fpmake uses it's own.
override FPCOPT:=$(filter-out -FU%,$(FPCOPT))
override FPCOPT:=$(filter-out -FE%,$(FPCOPT))
# Compose general fpmake-parameters
ifdef FPMAKEOPT
FPMAKE_OPT+=$(FPMAKEOPT)
endif
FPMAKE_OPT+=--localunitdir=../..
FPMAKE_OPT+=--globalunitdir=..
FPMAKE_OPT+=$(FPC_TARGETOPT)
FPMAKE_OPT+=$(addprefix -o ,$(FPCOPT))
FPMAKE_OPT+=--compiler=$(FPC)
FPMAKE_OPT+=-bu
.NOTPARALLEL:
fpmake: fpmake.pp
$(FPCFPMAKE) fpmake.pp $(FPMAKE_SKIP_CONFIG) $(addprefix -Fu,$(COMPILER_FPMAKE_UNITDIR)) $(FPCMAKEOPT) $(OPT)
all: fpmake
$(LOCALFPMAKE) compile $(FPMAKE_OPT)
smart: fpmake
$(LOCALFPMAKE) compile $(FPMAKE_OPT) -o -XX -o -CX
release: fpmake
$(LOCALFPMAKE) compile $(FPMAKE_OPT) -o -dRELEASE
debug: fpmake
$(LOCALFPMAKE) compile $(FPMAKE_OPT) -o -dDEBUG
# If no fpmake exists and (dist)clean is called, do not try to build fpmake, it will
# most often fail because the dependencies are cleared.
# In case of a clean, simply do nothing
ifeq ($(FPMAKE_BIN_CLEAN),)
clean:
else
clean:
$(FPMAKE_BIN_CLEAN) clean $(FPMAKE_OPT)
endif
# In case of a distclean, perform an 'old'-style distclean. This to avoid problems
# when the package is compiled using fpcmake prior to running this clean using fpmake
ifeq ($(FPMAKE_BIN_CLEAN),)
distclean: $(addsuffix _distclean,$(TARGET_DIRS)) fpc_cleanall
else
distclean:
ifdef inUnix
{ $(FPMAKE_BIN_CLEAN) distclean $(FPMAKE_OPT); if [ $$? != "0" ]; then { echo Something wrong with fpmake exectable. Remove the executable and call make recursively to recover.; $(DEL) $(FPMAKE_BIN_CLEAN); $(MAKE) fpc_cleanall; }; fi; }
else
$(FPMAKE_BIN_CLEAN) distclean $(FPMAKE_OPT)
endif
-$(DEL) $(LOCALFPMAKE)
endif
cleanall: distclean
install: fpmake
ifdef UNIXHier
$(LOCALFPMAKE) install $(FPMAKE_OPT) --prefix=$(INSTALL_PREFIX) --baseinstalldir=$(INSTALL_LIBDIR)/fpc/$(FPC_VERSION) --unitinstalldir=$(INSTALL_UNITDIR)
else
$(LOCALFPMAKE) install $(FPMAKE_OPT) --prefix=$(INSTALL_BASEDIR) --unitinstalldir=$(INSTALL_UNITDIR)
endif
# distinstall also installs the example-sources
distinstall: fpmake
ifdef UNIXHier
$(LOCALFPMAKE) install $(FPMAKE_OPT) --prefix=$(INSTALL_PREFIX) --baseinstalldir=$(INSTALL_LIBDIR)/fpc/$(FPC_VERSION) --unitinstalldir=$(INSTALL_UNITDIR) -ie
else
$(LOCALFPMAKE) install $(FPMAKE_OPT) --prefix=$(INSTALL_BASEDIR) --unitinstalldir=$(INSTALL_UNITDIR) -ie
endif

38
packages/jni/fpmake.pp Normal file
View File

@ -0,0 +1,38 @@
{$ifndef ALLPACKAGES}
{$mode objfpc}{$H+}
program fpmake;
uses fpmkunit;
Var
P : TPackage;
T : TTarget;
begin
With Installer do
begin
{$endif ALLPACKAGES}
P:=AddPackage('jni');
{$ifdef ALLPACKAGES}
P.Directory:='jni';
{$endif ALLPACKAGES}
P.Version:='2.7.1';
P.OSes := [win32,win64,linux,android];
P.Author := 'FreePascal development team';
P.License := 'LGPL with modification, ';
P.HomepageURL := 'www.freepascal.org';
P.SourcePath.Add('src');
P.SupportBuildModes := [bmOneByOne];
P.Options.Add('-Ur');
T:=P.Targets.AddUnit('jni.pas');
{$ifndef ALLPACKAGES}
Run;
end;
end.
{$endif ALLPACKAGES}