summaryrefslogtreecommitdiffstats
path: root/rules/libxslt.make
blob: 21c3c2f937a8a232907f9a7747f1d9f5b7277960 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
# -*-makefile-*-
# $Id: template 2878 2005-07-03 17:54:38Z rsc $
#
# Copyright (C) 2005 by Robert Schwebel
#
# See CREDITS for details about who has contributed to this project.
#
# For further information about the PTXdist project and license conditions
# see the README file.
#

#
# We provide this package
#
PACKAGES-$(PTXCONF_LIBXSLT) += libxslt

#
# Paths and names
#
LIBXSLT_VERSION	= 1.1.15
LIBXSLT		= libxslt-$(LIBXSLT_VERSION)
LIBXSLT_SUFFIX	= tar.gz
LIBXSLT_URL	= ftp://xmlsoft.org/libxslt/$(LIBXSLT).$(LIBXSLT_SUFFIX)
LIBXSLT_SOURCE	= $(SRCDIR)/$(LIBXSLT).$(LIBXSLT_SUFFIX)
LIBXSLT_DIR	= $(BUILDDIR)/$(LIBXSLT)


# ----------------------------------------------------------------------------
# Get
# ----------------------------------------------------------------------------

libxslt_get: $(STATEDIR)/libxslt.get

$(STATEDIR)/libxslt.get: $(libxslt_get_deps_default)
	@$(call targetinfo, $@)
	@$(call touch, $@)

$(LIBXSLT_SOURCE):
	@$(call targetinfo, $@)
	@$(call get, LIBXSLT)

# ----------------------------------------------------------------------------
# Extract
# ----------------------------------------------------------------------------

libxslt_extract: $(STATEDIR)/libxslt.extract

$(STATEDIR)/libxslt.extract: $(libxslt_extract_deps_default)
	@$(call targetinfo, $@)
	@$(call clean, $(LIBXSLT_DIR))
	@$(call extract, LIBXSLT)
	@$(call patchin, LIBXSLT)
	@$(call touch, $@)

# ----------------------------------------------------------------------------
# Prepare
# ----------------------------------------------------------------------------

libxslt_prepare: $(STATEDIR)/libxslt.prepare

LIBXSLT_PATH	=  PATH=$(CROSS_PATH)
LIBXSLT_ENV 	=  $(CROSS_ENV)

#
# autoconf
#
LIBXSLT_AUTOCONF =  $(CROSS_AUTOCONF_USR)
LIBXSLT_AUTOCONF += --with-libxml-libs-prefix=$(SYSROOT)/usr/lib
LIBXSLT_AUTOCONF += --with-libxml-include-prefix=$(SYSROOT)/usr/include
LIBXSLT_AUTOCONF += --without-python

ifdef PTXCONF_LIBXSLT_CRYPTO
	LIBXSLT_AUTOCONF += --with-crypto
else
	LIBXSLT_AUTOCONF += --without-crypto
endif


ifdef PTXCONF_LIBXSLT_PLUGINS
	LIBXSLT_AUTOCONF += --with-plugins
else
	LIBXSLT_AUTOCONF += --without-plugins
endif


ifdef PTXCONF_LIBXSLT_DEBUG
	LIBXSLT_AUTOCONF += --with-debug
	LIBXSLT_AUTOCONF += --with-debugger
else
	LIBXSLT_AUTOCONF += --without-debug
	LIBXSLT_AUTOCONF += --without-debugger
endif


$(STATEDIR)/libxslt.prepare: $(libxslt_prepare_deps_default)
	@$(call targetinfo, $@)
	@$(call clean, $(LIBXSLT_DIR)/config.cache)
	cd $(LIBXSLT_DIR) && \
		$(LIBXSLT_PATH) $(LIBXSLT_ENV) \
		./configure $(LIBXSLT_AUTOCONF)
	@$(call touch, $@)

# ----------------------------------------------------------------------------
# Compile
# ----------------------------------------------------------------------------

libxslt_compile: $(STATEDIR)/libxslt.compile

$(STATEDIR)/libxslt.compile: $(libxslt_compile_deps_default)
	@$(call targetinfo, $@)
	cd $(LIBXSLT_DIR) && $(LIBXSLT_ENV) $(LIBXSLT_PATH) make
	@$(call touch, $@)

# ----------------------------------------------------------------------------
# Install
# ----------------------------------------------------------------------------

libxslt_install: $(STATEDIR)/libxslt.install

$(STATEDIR)/libxslt.install: $(libxslt_install_deps_default)
	@$(call targetinfo, $@)
	@$(call install, LIBXSLT)

	# FIXME: this probably has to be fixed upstream!
	# libxslt installs xslt-config to wrong path.
	install $(LIBXSLT_DIR)/xslt-config $(PTXCONF_CROSS_PREFIX)/bin/

	@$(call touch, $@)

# ----------------------------------------------------------------------------
# Target-Install
# ----------------------------------------------------------------------------

libxslt_targetinstall: $(STATEDIR)/libxslt.targetinstall

$(STATEDIR)/libxslt.targetinstall: $(libxslt_targetinstall_deps_default)
	@$(call targetinfo, $@)

	@$(call install_init, libxslt)
	@$(call install_fixup, libxslt,PACKAGE,libxslt)
	@$(call install_fixup, libxslt,PRIORITY,optional)
	@$(call install_fixup, libxslt,VERSION,$(LIBXSLT_VERSION))
	@$(call install_fixup, libxslt,SECTION,base)
	@$(call install_fixup, libxslt,AUTHOR,"Robert Schwebel <r.schwebel\@pengutronix.de>")
	@$(call install_fixup, libxslt,DEPENDS,)
	@$(call install_fixup, libxslt,DESCRIPTION,missing)

ifdef PTXCONF_LIBXSLT_LIBXSLT
	@$(call install_copy, libxslt, 0, 0, 0644, \
		$(LIBXSLT_DIR)/libxslt/.libs/libxslt.so.1.1.15, \
		/usr/lib/libxslt.so.1.1.15)
	@$(call install_link, libxslt, libxslt.so.1.1.15, /usr/lib/libxslt.so.1)
	@$(call install_link, libxslt, libxslt.so.1.1.15, /usr/lib/libxslt.so)
endif

ifdef PTXCONF_LIBXSLT_LIBEXSLT
	@$(call install_copy, libxslt, 0, 0, 0644, \
		$(LIBXSLT_DIR)/libexslt/.libs/libexslt.so.0.8.12, \
		/usr/lib/libexslt.so.0.8.12)
	@$(call install_link, libxslt, libexslt.so.0.8.12, /usr/lib/libexslt.so.0)
	@$(call install_link, libxslt, libexslt.so.0.8.12, /usr/lib/libexslt.so)
endif

ifdef PTXCONF_LIBXSLT_XSLTPROC
	@$(call install_copy, libxslt, 0, 0, 0755, \
		$(LIBXSLT_DIR)/xsltproc/.libs/xsltproc, \
		/usr/bin/xsltproc)
endif

	@$(call install_finish, libxslt)

	@$(call touch, $@)

# ----------------------------------------------------------------------------
# Clean
# ----------------------------------------------------------------------------

libxslt_clean:
	rm -rf $(STATEDIR)/libxslt.*
	rm -rf $(IMAGEDIR)/libxslt_*
	rm -rf $(LIBXSLT_DIR)

# vim: syntax=make