New package: libpfm4-4.13.0

This commit is contained in:
Đoàn Trần Công Danh 2023-09-05 20:25:30 +07:00
parent 60250d58ee
commit aa407693a4
5 changed files with 102 additions and 1 deletions

View File

@ -3405,7 +3405,7 @@ libeog.so eog-3.28.0_4
libfreexl.so.1 freexl-1.0.5_1
libgeos_c.so.1 geos-3.9.0_1
libpapi.so.5 papi-5.6.0_1
libpfm.so.4 papi-5.6.0_1
libpfm.so.4 libpfm4-4.13.0_1
libfifechan.so.0.1.5 fifechan-0.1.5_1
libfifechan_sdl.so.0.1.5 fifechan-0.1.5_1
libfifechan_opengl.so.0.1.5 fifechan-0.1.5_1

1
srcpkgs/libpfm4-devel Symbolic link
View File

@ -0,0 +1 @@
libpfm4

View File

@ -0,0 +1,43 @@
--- a/config.mk
+++ b/config.mk
@@ -28,8 +28,20 @@
# It is included by every Makefile
#
#
-SYS := $(shell uname -s)
-ARCH := $(shell uname -m)
+SYS := Linux
+ifeq (i686,$(findstring i686,$(XBPS_TARGET_MACHINE)))
+ARCH := i386
+else ifeq (x86_64,$(findstring x86_64,$(XBPS_TARGET_MACHINE)))
+ARCH := x86_64
+else ifeq (arm,$(findstring arm,$(XBPS_TARGET_MACHINE)))
+ARCH := arm
+else ifeq (aarch64,$(findstring aarch64,$(XBPS_TARGET_MACHINE)))
+ARCH := arm64
+else ifeq (ppc,$(findstring ppc,$(XBPS_TARGET_MACHINE)))
+ARCH := powerpc
+else ifeq (mips,$(findstring mips,$(XBPS_TARGET_MACHINE)))
+ARCH := mips
+endif
ifeq (i686,$(findstring i686,$(ARCH)))
override ARCH=i386
endif
@@ -116,7 +128,7 @@ AGE=0
#
# Where should things (lib, headers, man) go in the end.
#
-PREFIX?=/usr/local
+PREFIX?=/usr
LIBDIR=$(PREFIX)/lib
INCDIR=$(PREFIX)/include
MANDIR=$(PREFIX)/share/man
@@ -198,7 +210,7 @@ PFMLIBDIR=$(TOPDIR)/lib
# -Wextra: to enable extra compiler sanity checks (e.g., signed vs. unsigned)
# -Wno-unused-parameter: to avoid warnings on unused foo(void *this) parameter
#
-DBG?=-g -Wall -Werror -Wextra -Wno-unused-parameter
+DBG?=-g -Wall -Wextra -Wno-unused-parameter
ifeq ($(SYS),Darwin)
# older gcc-4.2 does not like -Wextra and some of our initialization code

56
srcpkgs/libpfm4/template Normal file
View File

@ -0,0 +1,56 @@
# Template file for 'libpfm4'
pkgname=libpfm4
version=4.13.0
revision=1
build_style=gnu-makefile
build_helper=python3
make_use_env=yes
hostmakedepends="python3-setuptools swig"
makedepends="python3-devel"
short_desc="Library to program the performance monitoring events"
maintainer="Đoàn Trần Công Danh <congdanhqx@gmail.com>"
license="MIT"
homepage="https://perfmon2.sourceforge.net/"
distfiles="${SOURCEFORGE_SITE}/perfmon2/libpfm-${version}.tar.gz"
checksum=d18b97764c755528c1051d376e33545d0eb60c6ebf85680436813fa5b04cc3d1
conflicts="papi<7.0.0_1"
export XBPS_TARGET_MACHINE
do_build() {
msg_normal "Building libpfm4\n"
make ${makejobs} PREFIX=/usr
msg_normal "Building Python 3 bindings\n"
cd python
python3 setup.py build
}
do_install() {
make install DESTDIR=${DESTDIR} PREFIX=/usr
{
find include lib -name '*.h' -o -name '*.c' |
xargs grep -h Copyright
cat COPYING
} >license
vlicense license
}
libpfm4-devel_package() {
depends="${sourcepkg}>=${version}_${revision}"
short_desc+=" - development files"
conflicts="papi-devel<7.0.0_1"
pkg_install() {
vmove usr/share/man/man3
vmove usr/include
vmove "usr/lib/*.a"
vmove "usr/lib/*.so"
}
}
python3-perfmon_package() {
short_desc+=" - Python 3 bindings"
pkg_install() {
cd python
python3 setup.py install --prefix=/usr --root=${PKGDESTDIR}
}
}

1
srcpkgs/python3-perfmon Symbolic link
View File

@ -0,0 +1 @@
libpfm4