summaryrefslogtreecommitdiffstats
path: root/rules/libxslt.make
blob: 1def590d84a53f9dc4e5086759a47f9f20cd1a60 (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
# -*-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.24
LIBXSLT		:= libxslt-$(LIBXSLT_VERSION)
LIBXSLT_SUFFIX	:= tar.gz
LIBXSLT_SOURCE	:= $(SRCDIR)/$(LIBXSLT).$(LIBXSLT_SUFFIX)
LIBXSLT_DIR	:= $(BUILDDIR)/$(LIBXSLT)

LIBXSLT_URL	:= \
	ftp://xmlsoft.org/libxslt/$(LIBXSLT).$(LIBXSLT_SUFFIX) \
	ftp://xmlsoft.org/libxslt/old/$(LIBXSLT).$(LIBXSLT_SUFFIX)

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

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

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

LIBXSLT_PATH	:= PATH=$(CROSS_PATH)

#
# FIXME:
#
# without the RM definition, I get tons of "cannot remove conftest*"
#

LIBXSLT_ENV = \
	$(CROSS_ENV) \
	XML_CONFIG=$(LIBXML2_DIR)/xml2-config \
	RM='/bin/rm -f'

#
# autoconf
#
LIBXSLT_AUTOCONF := \
	 $(CROSS_AUTOCONF_USR) \
	--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 \
	--with-with_debugger
else
LIBXSLT_AUTOCONF += \
	--without-debug \
	--with-with_debugger=no
endif


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

$(STATEDIR)/libxslt.install:
	@$(call targetinfo)
	@$(call install, LIBXSLT)
	@install $(LIBXSLT_DIR)/xslt-config $(PTXCONF_SYSROOT_CROSS)/bin/
	@$(call touch)

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

$(STATEDIR)/libxslt.targetinstall:
	@$(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.24, \
		/usr/lib/libxslt.so.1.1.24)
	@$(call install_link, libxslt, libxslt.so.1.1.24, /usr/lib/libxslt.so.1)
	@$(call install_link, libxslt, libxslt.so.1.1.24, /usr/lib/libxslt.so)
endif

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

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

	@$(call install_finish, libxslt)

	@$(call touch)

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

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

# vim: syntax=make