1 # -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
2 # Version: MPL 1.1 / GPLv3+ / LGPLv3+
4 # The contents of this file are subject to the Mozilla Public License Version
5 # 1.1 (the "License"); you may not use this file except in compliance with
6 # the License or as specified alternatively below. You may obtain a copy of
7 # the License at http://www.mozilla.org/MPL/
9 # Software distributed under the License is distributed on an "AS IS" basis,
10 # WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
11 # for the specific language governing rights and limitations under the
14 # Major Contributor(s):
15 # Copyright (C) 2012 Red Hat, Inc., Caolán McNamara <caolanm@redhat.com>
17 # Copyright (C) 2012 Red Hat, Inc., David Tardon <dtardon@redhat.com>
19 # All Rights Reserved.
21 # For minor contributions see the git repository.
23 # Alternatively, the contents of this file may be used under the terms of
24 # either the GNU General Public License Version 3 or later (the "GPLv3+"), or
25 # the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"),
26 # in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
27 # instead of those above.
29 $(eval
$(call gb_CustomTarget_CustomTarget
,clucene
/source
))
31 clucene_DIR
:= $(call gb_CustomTarget_get_workdir
,clucene
/source
)
33 $(call gb_CustomTarget_get_target
,clucene
/source
) : $(clucene_DIR
)/done
35 # FIXME: do not hardcode the path here
36 ifeq ($(OS_FOR_BUILD
),WNT
)
37 clucene_FIXED_TARFILE_LOCATION
:= $(shell cygpath
-u
$(TARFILE_LOCATION
))/48d647fbd8ef8889e5a7f422c1bfda94-clucene-core-2.3
.3.4.
tar.gz
39 clucene_FIXED_TARFILE_LOCATION
:= $(TARFILE_LOCATION
)/48d647fbd8ef8889e5a7f422c1bfda94-clucene-core-2.3
.3.4.
tar.gz
43 _CLUCENE_CONFIG_H
:= $(SRCDIR
)/clucene
/configs
/_clucene-config-MSVC.h
45 CLUCENE_CONFIG_H
:= $(SRCDIR
)/clucene
/configs
/clucene-config-MSVC.h
47 CLUCENE_CONFIG_H
:= $(SRCDIR
)/clucene
/configs
/clucene-config-MINGW.h
50 CLUCENE_CONFIG_H
:= $(SRCDIR
)/clucene
/configs
/clucene-config-generic.h
52 _CLUCENE_CONFIG_H
:= $(SRCDIR
)/clucene
/configs
/_clucene-config-LINUX.h
54 _CLUCENE_CONFIG_H
:= $(SRCDIR
)/clucene
/configs
/_clucene-config-generic.h
58 # clucene-multimap-put.patch was proposed upstream, see
59 # <http://sourceforge.net/mailarchive/message.php?msg_id=29143260>:
60 $(clucene_DIR
)/done
: $(clucene_FIXED_TARFILE_LOCATION
) \
61 $(_CLUCENE_CONFIG_H
) $(CLUCENE_CONFIG_H
)
62 $(call gb_Output_announce
,$(subst $(WORKDIR
)/,,$@
),$(true
),TAR
,1)
63 $(call gb_Helper_abbreviate_dirs
, \
64 mkdir
-p
$(dir $@
) && cd
$(dir $@
) && \
65 $(GNUTAR
) -x
-z
$(STRIP_COMPONENTS
)=1 -f
$< && \
66 $(GNUPATCH
) -p0
< $(SRCDIR
)/clucene
/patches
/clucene-internal-zlib.patch
&& \
67 $(GNUPATCH
) -p0
< $(SRCDIR
)/clucene
/patches
/clucene-warnings.patch
&& \
68 $(GNUPATCH
) -p0
< $(SRCDIR
)/clucene
/patches
/clucene-gcc-atomics.patch
&& \
69 $(GNUPATCH
) -p0
< $(SRCDIR
)/clucene
/patches
/clucene-debug.patch
&& \
70 $(GNUPATCH
) -p0
< $(SRCDIR
)/clucene
/patches
/clucene-narrowing-conversions.patch
&& \
71 $(GNUPATCH
) -p0
< $(SRCDIR
)/clucene
/patches
/clucene-multimap-put.patch
&& \
72 for i in
`find $(clucene_DIR)/ -name "*.cpp"`; do mv
$$i $${i
%%cpp}cxx; done
)
73 #FIXME ?, our rules expect .cxx
75 #dirent.h is a problem, move it around
76 mkdir
-p
$(clucene_DIR
)/inc
/internal
/CLucene
/util
77 mv
$(clucene_DIR
)/src
/shared
/CLucene
/util
/dirent.h
$(clucene_DIR
)/inc
/internal
/CLucene
/util
79 #To generate these, run cmake for each sufficiently different platform, customize and stick into configs
80 cp
$(CLUCENE_CONFIG_H
) $(clucene_DIR
)/src
/shared
/CLucene
/clucene-config.h
81 cp
$(_CLUCENE_CONFIG_H
) $(clucene_DIR
)/src
/shared
/CLucene
/_clucene-config.h
84 # vim: set noet sw=4 ts=4: