swi-prolog: update to 9.2.9
[oi-userland.git] / components / python / py3c / python-integrate-project.conf
blob3a14d81137e9c965228d12e0f4a4870ce7a2e38a
2 # This file and its contents are supplied under the terms of the
3 # Common Development and Distribution License ("CDDL"), version 1.0.
4 # You may only use this file in accordance with the terms of version
5 # 1.0 of the CDDL.
7 # A full copy of the text of the CDDL should have accompanied this
8 # source.  A copy of the CDDL is also available via the Internet at
9 # http://www.illumos.org/license/CDDL.
13 # Copyright 2023 Marcel Telka
16 %patch% 01-gmake.patch
17 %patch% 02-posix-rm.patch
19 %include-2%
20 # https://github.com/encukou/py3c/issues/56
21 COMPONENT_ARCHIVE_URL =         \
22         https://github.com/encukou/py3c/archive/refs/tags/v$(HUMAN_VERSION).tar.gz
23 %include-3%
24 # see $(SOURCE_DIR)/Makefile
25 # and https://github.com/encukou/py3c/issues/24#issuecomment-1447981119
26 COMPONENT_POST_INSTALL_ACTION += \
27         $(MKDIR) $(PROTO_DIR)$(PKG_CONFIG_PATH.$(BITS)) ; \
28         $(GSED) -e 's:@includedir@:$(shell $(PYTHON) -c "from sysconfig import get_paths; print(get_paths()[\"include\"])"):' \
29                 -e 's|^Cflags:.*$$|& -I$${includedir}/py3c|' \
30                 $(@D)/py3c.pc.in \
31                 > $(PROTO_DIR)$(PKG_CONFIG_PATH.$(BITS))/py3c.pc-$(PYTHON_VERSION) ;
33 # Normalize special PYV case
34 COMPONENT_TEST_TRANSFORMS += "-e 's/\(cpython-\)$(shell echo $(PYTHON_VERSION) | tr -d .)/\1\$$(PYV)/'"
36 # Make sure include files are included in right packages
37 GENERATE_EXTRA_CMD += | \
38         $(GSED) -e 's|^.*usr/include/python\(3.[0-9]*\)[^0-9]|$$(PYTHON_\1_ONLY)&|'
39 # Replace Python version in pkgconfig file names
40 GENERATE_EXTRA_CMD += | \
41         $(GSED) -e 's/\(py3c\.pc-\)3\.[0-9]*$$/\1$$(PYVER)/' | uniq
42 %hook-no-license%
43 cat "$SOURCE_DIR/LICENSE.MIT" > "$DISTRIBUTION.license"
44 %hook-manifest%
45 # Create mediated symlinks
46 printf '<transform file path=(usr/.*/pkgconfig/)(py3c\\.pc)-(3\\.\\d+)$ -> emit link path=%%<1>%%<2> target=%%<2>-%%<3> mediator=python mediator-version=%%<3> >\n' >> "$DISTRIBUTION-PYVER.p5m"