diff options
author | Matthieu Herrb <matthieu@herrb.eu> | 2024-02-25 12:27:34 +0100 |
---|---|---|
committer | Matthieu Herrb <matthieu@herrb.eu> | 2024-02-25 12:27:34 +0100 |
commit | baf7bc8af639e03729f2c0a17a6aa303964ce3df (patch) | |
tree | 0456b7fda08e0243201cb4039076f077a3567328 | |
parent | 37ac78bf6d59f60e75339c97c55cdf55b9488dd1 (diff) | |
parent | 04271a93ed65bfde82469509120214424eb918d0 (diff) |
Merge remote-tracking branch 'origin/master' into obsd
-rw-r--r-- | .gitlab-ci.yml | 84 | ||||
-rw-r--r-- | Makefile.am | 48 | ||||
-rwxr-xr-x | autogen.sh | 17 | ||||
-rw-r--r-- | configure.ac | 145 | ||||
-rw-r--r-- | include/Makefile.am | 1 | ||||
-rw-r--r-- | m4/ax_define_dir.m4 | 49 | ||||
-rw-r--r-- | man/Makefile.am | 37 | ||||
-rw-r--r-- | meson.build | 2 | ||||
-rw-r--r-- | scanpci/Makefile.am | 31 | ||||
-rw-r--r-- | src/Makefile.am | 80 |
10 files changed, 4 insertions, 490 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index e81d4c9..bcb75cf 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -4,7 +4,7 @@ # Please see the ci-templates documentation for details: # https://freedesktop.pages.freedesktop.org/ci-templates/ -.templates_sha: &template_sha 34f4ade99434043f88e164933f570301fd18b125 # see https://docs.gitlab.com/ee/ci/yaml/#includefile +.templates_sha: &template_sha 185ede0e9b9b1924b92306ab8b882a6294e92613 # see https://docs.gitlab.com/ee/ci/yaml/#includefile include: @@ -30,11 +30,8 @@ variables: # The tag should be updated each time the list of packages is updated. # Changing a tag forces the associated image to be rebuilt. # Note: the tag has no meaning, we use a date format purely for readability - FDO_DISTRIBUTION_TAG: '2022-04-02.0' - BASE_PACKAGES: 'git meson ninja gcc autoconf automake libtool make xorg-util-macros pkgconf zlib' - # extra packages we need for various tests - EXTRA_PACKAGES: 'jq' - FDO_DISTRIBUTION_PACKAGES: $BASE_PACKAGES $EXTRA_PACKAGES + FDO_DISTRIBUTION_TAG: '2023-10-17.1' + FDO_DISTRIBUTION_PACKAGES: 'git meson ninja gcc pkgconf zlib' # # Verify that commit messages are as expected, signed-off, etc. @@ -98,78 +95,3 @@ meson: - meson configure builddir - ninja -C builddir test - ninja -C builddir install - -autotools: - extends: - - .fdo.distribution-image@arch - stage: build - parallel: - matrix: - - CONFIGURE_OPTIONS: ['', '--with-zlib'] - script: - - mkdir -p ../_inst _build - - autoreconf -ivf - - pushd _build - - ../configure --prefix="$PWD/../_inst" $CONFIGURE_OPTIONS - - make check - - make install - - make distcheck - - mv libpciaccess*.tar.gz .. - - popd - artifacts: - paths: - - libpciaccess*.tar.gz - -meson from tarball: - extends: - - .fdo.distribution-image@arch - stage: test - script: - - mkdir -p _tarball_build - - tar xf libpciaccess-*.tar.gz -C _tarball_build - - pushd _tarball_build/libpciaccess-* - - meson setup builddir - - meson configure builddir - - ninja -C builddir test - needs: - - autotools - variables: - GIT_STRATEGY: none - -# -# Unlike the xproto version this was copied from, this just compares -# the ls output to make sure the same files were installed, since -# comparing file contents lists mismatches with the ELF binaries and -# in the generated pkg-config files that are not issues here. -# -compare meson and autotools: - extends: - - .fdo.distribution-image@arch - stage: test - script: - - mkdir -p $PWD/_meson_inst - - mkdir -p $PWD/_autotools_inst - # the prefix ends up in the pkgconfig files, so we use a symlink - # to use the same --prefix for meson and autotools - - ln -sf $PWD/_meson_inst $PWD/_inst - - meson setup builddir --prefix=$PWD/_inst - - ninja -C builddir install - - ls -R _inst > _meson_inst.ls - - rm $PWD/_inst - - ln -sf $PWD/_autotools_inst $PWD/_inst - - autoreconf -ivf - - ./configure --prefix=$PWD/_inst --enable-shared --disable-static - - make && make install - - rm -f $PWD/_inst/lib/lib*.la - - ls -R _inst > _autotools_inst.ls - - diff -u $PWD/_meson_inst.ls $PWD/_autotools_inst.ls - -check versions are in sync: - extends: - - .fdo.distribution-image@arch - stage: test - script: - - autoreconf -ivf - - ./configure --version | head -n 1 | sed -e 's/libpciaccess configure //' > autotools.version - - meson introspect meson.build --projectinfo | jq -r '.version' > meson.version - - diff -u autotools.version meson.version || (echo "ERROR - autotools and meson versions not in sync" && false) diff --git a/Makefile.am b/Makefile.am deleted file mode 100644 index 0d08fa4..0000000 --- a/Makefile.am +++ /dev/null @@ -1,48 +0,0 @@ -# -# (C) Copyright IBM Corporation 2006 -# All Rights Reserved. -# -# Permission is hereby granted, free of charge, to any person obtaining a -# copy of this software and associated documentation files (the "Software"), -# to deal in the Software without restriction, including without limitation -# on the rights to use, copy, modify, merge, publish, distribute, sub -# license, and/or sell copies of the Software, and to permit persons to whom -# the Software is furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice (including the next -# paragraph) shall be included in all copies or substantial portions of the -# Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL -# IBM AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -# DEALINGS IN THE SOFTWARE. - -# Include autoconf macros from m4 subdir -ACLOCAL_AMFLAGS = -I m4 - -# Order: scanpci depends on libpciaccess built in src -SUBDIRS = include man src scanpci - -pkgconfigdir = $(libdir)/pkgconfig -pkgconfig_DATA = pciaccess.pc - -MAINTAINERCLEANFILES = ChangeLog INSTALL - -.PHONY: ChangeLog INSTALL - -INSTALL: - $(INSTALL_CMD) - -ChangeLog: - $(CHANGELOG_CMD) - -dist-hook: ChangeLog INSTALL - -EXTRA_DIST = \ - README.md \ - meson.build \ - meson_options.txt diff --git a/autogen.sh b/autogen.sh deleted file mode 100755 index 2e37971..0000000 --- a/autogen.sh +++ /dev/null @@ -1,17 +0,0 @@ -#! /bin/sh - -srcdir=`dirname "$0"` -test -z "$srcdir" && srcdir=. - -ORIGDIR=`pwd` -cd "$srcdir" - -autoreconf --force --verbose --install || exit 1 -cd "$ORIGDIR" || exit $? - -git config --local --get format.subjectPrefix >/dev/null 2>&1 || - git config --local format.subjectPrefix "PATCH libpciaccess" - -if test -z "$NOCONFIGURE"; then - exec "$srcdir"/configure "$@" -fi diff --git a/configure.ac b/configure.ac deleted file mode 100644 index fea2a29..0000000 --- a/configure.ac +++ /dev/null @@ -1,145 +0,0 @@ -# (C) Copyright IBM Corporation 2006 -# All Rights Reserved. -# -# Permission is hereby granted, free of charge, to any person obtaining a -# copy of this software and associated documentation files (the "Software"), -# to deal in the Software without restriction, including without limitation -# on the rights to use, copy, modify, merge, publish, distribute, sub -# license, and/or sell copies of the Software, and to permit persons to whom -# the Software is furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice (including the next -# paragraph) shall be included in all copies or substantial portions of the -# Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL -# IBM AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -# DEALINGS IN THE SOFTWARE. -# - -# Initialize Autoconf -AC_PREREQ([2.60]) -AC_INIT([libpciaccess],[0.17], - [https://gitlab.freedesktop.org/xorg/lib/libpciaccess/-/issues], - [libpciaccess]) -AC_CONFIG_HEADERS([config.h]) -AC_CONFIG_AUX_DIR([.]) - -# Initialize Automake -AM_INIT_AUTOMAKE([foreign dist-xz]) -AC_USE_SYSTEM_EXTENSIONS - -# Initialize libtool -AC_PROG_LIBTOOL - -# Require X.Org macros 1.8 or later -m4_ifndef([XORG_MACROS_VERSION], - [m4_fatal([must install xorg-macros 1.8 or later before running autoconf/autogen])]) -XORG_MACROS_VERSION(1.8) -XORG_DEFAULT_OPTIONS -PKG_PROG_PKG_CONFIG - -pciids_path=/usr/share/hwdata -AC_ARG_WITH(pciids-path, AS_HELP_STRING([--with-pciids-path=PCIIDS_PATH], - [Path to pci.ids file]), [pciids_path="$withval"]) -AX_DEFINE_DIR(PCIIDS_PATH, pciids_path, [Path to pci.ids]) - -AC_ARG_ENABLE(linux-rom-fallback, AS_HELP_STRING([--enable-linux-rom-fallback], - [Enable support for falling back to /dev/mem for roms (default: disabled)]), - [LINUX_ROM=$enableval],[LINUX_ROM=no]) - -if test "x$LINUX_ROM" = xyes; then - AC_DEFINE(LINUX_ROM, 1, [Linux ROM read fallback]) -fi - -use_zlib=no -AC_ARG_WITH(zlib, AS_HELP_STRING([--with-zlib], - [Enable zlib support to read gzip compressed pci.ids]), - [use_zlib="$withval"]) -if test "x$use_zlib" = xyes; then - PKG_CHECK_MODULES([ZLIB], [zlib]) - PCIACCESS_CFLAGS="$PCIACCESS_CFLAGS $ZLIB_CFLAGS" - PCIACCESS_LIBS="$PCIACCESS_LIBS $ZLIB_LIBS" - AC_DEFINE(HAVE_ZLIB, 1, [Use zlib to read gzip compressed pci.ids]) -fi - -case $host_os in - *freebsd* | *dragonfly*) - freebsd=yes - ;; - *linux*) - linux=yes - ;; - *netbsd*) - case $host in - *i[[3-9]]86*) - PCIACCESS_LIBS="$PCIACCESS_LIBS -li386" - ;; - *x86_64*|*amd64*) - PCIACCESS_LIBS="$PCIACCESS_LIBS -lx86_64" - ;; - *alpha*) - PCIACCESS_LIBS="$PCIACCESS_LIBS -lalpha" - ;; - esac - PCIACCESS_LIBS="$PCIACCESS_LIBS -lpci" - netbsd=yes - ;; - *openbsd*) - openbsd=yes - ;; - *solaris*) - solaris=yes - PCIACCESS_LIBS="$PCIACCESS_LIBS -ldevinfo" - ;; - gnu*) - gnu=yes - ;; - *cygwin*) - cygwin=yes - PCIACCESS_LIBS="$PCIACCESS_LIBS" - ;; -esac - -AM_CONDITIONAL(LINUX, [test "x$linux" = xyes]) -AM_CONDITIONAL(FREEBSD, [test "x$freebsd" = xyes]) -AM_CONDITIONAL(NETBSD, [test "x$netbsd" = xyes]) -AM_CONDITIONAL(OPENBSD, [test "x$openbsd" = xyes]) -AM_CONDITIONAL(SOLARIS, [test "x$solaris" = xyes]) -AM_CONDITIONAL(GNU, [test "x$gnu" = xyes]) -AM_CONDITIONAL(CYGWIN, [test "x$cygwin" = xyes]) - -AC_SYS_LARGEFILE - -AC_CHECK_HEADERS([err.h]) - -if test "x$netbsd" = xyes; then -AC_CHECK_HEADERS([machine/sysarch.h]) -AC_CHECK_HEADERS([machine/mtrr.h], [have_mtrr_h="yes"], [have_mtrr_h="no"], -[#ifdef HAVE_MACHINE_SYSARCH_H -#include <sys/types.h> -#include <machine/sysarch.h> -#endif -]) -else -AC_CHECK_HEADER([asm/mtrr.h], [have_mtrr_h="yes"], [have_mtrr_h="no"]) -fi - -if test "x$have_mtrr_h" = xyes; then - AC_DEFINE(HAVE_MTRR, 1, [Use MTRRs on mappings]) -fi - -AC_SUBST(PCIACCESS_CFLAGS) -AC_SUBST(PCIACCESS_LIBS) - -AC_CONFIG_FILES([Makefile - include/Makefile - man/Makefile - src/Makefile - scanpci/Makefile - pciaccess.pc]) -AC_OUTPUT diff --git a/include/Makefile.am b/include/Makefile.am deleted file mode 100644 index b668192..0000000 --- a/include/Makefile.am +++ /dev/null @@ -1 +0,0 @@ -include_HEADERS = pciaccess.h diff --git a/m4/ax_define_dir.m4 b/m4/ax_define_dir.m4 deleted file mode 100644 index b74d155..0000000 --- a/m4/ax_define_dir.m4 +++ /dev/null @@ -1,49 +0,0 @@ -# =========================================================================== -# http://www.gnu.org/software/autoconf-archive/ax_define_dir.html -# =========================================================================== -# -# SYNOPSIS -# -# AX_DEFINE_DIR(VARNAME, DIR [, DESCRIPTION]) -# -# DESCRIPTION -# -# This macro sets VARNAME to the expansion of the DIR variable, taking -# care of fixing up ${prefix} and such. -# -# VARNAME is then offered as both an output variable and a C preprocessor -# symbol. -# -# Example: -# -# AX_DEFINE_DIR([DATADIR], [datadir], [Where data are placed to.]) -# -# LICENSE -# -# Copyright (c) 2008 Stepan Kasal <kasal@ucw.cz> -# Copyright (c) 2008 Andreas Schwab <schwab@suse.de> -# Copyright (c) 2008 Guido U. Draheim <guidod@gmx.de> -# Copyright (c) 2008 Alexandre Oliva -# -# Copying and distribution of this file, with or without modification, are -# permitted in any medium without royalty provided the copyright notice -# and this notice are preserved. This file is offered as-is, without any -# warranty. - -#serial 6 - -AU_ALIAS([AC_DEFINE_DIR], [AX_DEFINE_DIR]) -AC_DEFUN([AX_DEFINE_DIR], [ - prefix_NONE= - exec_prefix_NONE= - test "x$prefix" = xNONE && prefix_NONE=yes && prefix=$ac_default_prefix - test "x$exec_prefix" = xNONE && exec_prefix_NONE=yes && exec_prefix=$prefix -dnl In Autoconf 2.60, ${datadir} refers to ${datarootdir}, which in turn -dnl refers to ${prefix}. Thus we have to use `eval' twice. - eval ax_define_dir="\"[$]$2\"" - eval ax_define_dir="\"$ax_define_dir\"" - AC_SUBST($1, "$ax_define_dir") - AC_DEFINE_UNQUOTED($1, "$ax_define_dir", [$3]) - test "$prefix_NONE" && prefix=NONE - test "$exec_prefix_NONE" && exec_prefix=NONE -]) diff --git a/man/Makefile.am b/man/Makefile.am deleted file mode 100644 index 752a5e2..0000000 --- a/man/Makefile.am +++ /dev/null @@ -1,37 +0,0 @@ -# -# Copyright (c) 2010, Oracle and/or its affiliates. -# -# Permission is hereby granted, free of charge, to any person obtaining a -# copy of this software and associated documentation files (the "Software"), -# to deal in the Software without restriction, including without limitation -# the rights to use, copy, modify, merge, publish, distribute, sublicense, -# and/or sell copies of the Software, and to permit persons to whom the -# Software is furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice (including the next -# paragraph) shall be included in all copies or substantial portions of the -# Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL -# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -# DEALINGS IN THE SOFTWARE. -# - -appman_PRE = scanpci.man -noinst_DATA = $(appman_PRE:man=$(APP_MAN_SUFFIX)) - -EXTRA_DIST = \ - $(appman_PRE) \ - meson.build - -CLEANFILES = $(noinst_DATA) - -# String replacements in MAN_SUBSTS now come from xorg-macros.m4 via configure -SUFFIXES = .$(APP_MAN_SUFFIX) .man - -.man.$(APP_MAN_SUFFIX): - $(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@ diff --git a/meson.build b/meson.build index c4a991d..b5b54a4 100644 --- a/meson.build +++ b/meson.build @@ -21,7 +21,7 @@ project( 'libpciaccess', ['c'], - version : '0.17', + version : '0.18', license : 'MIT', meson_version : '>= 0.48.0', default_options : ['buildtype=debugoptimized'], diff --git a/scanpci/Makefile.am b/scanpci/Makefile.am deleted file mode 100644 index 534f11c..0000000 --- a/scanpci/Makefile.am +++ /dev/null @@ -1,31 +0,0 @@ -# -# (C) Copyright IBM Corporation 2006 -# All Rights Reserved. -# -# Permission is hereby granted, free of charge, to any person obtaining a -# copy of this software and associated documentation files (the "Software"), -# to deal in the Software without restriction, including without limitation -# on the rights to use, copy, modify, merge, publish, distribute, sub -# license, and/or sell copies of the Software, and to permit persons to whom -# the Software is furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice (including the next -# paragraph) shall be included in all copies or substantial portions of the -# Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL -# IBM AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -# DEALINGS IN THE SOFTWARE. - -noinst_PROGRAMS = scanpci - -AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/src -LDADD = $(top_builddir)/src/libpciaccess.la - -scanpci_SOURCES = scanpci.c - -EXTRA_DIST = meson.build
\ No newline at end of file diff --git a/src/Makefile.am b/src/Makefile.am deleted file mode 100644 index e696408..0000000 --- a/src/Makefile.am +++ /dev/null @@ -1,80 +0,0 @@ -# -# (C) Copyright IBM Corporation 2006 -# All Rights Reserved. -# -# Permission is hereby granted, free of charge, to any person obtaining a -# copy of this software and associated documentation files (the "Software"), -# to deal in the Software without restriction, including without limitation -# on the rights to use, copy, modify, merge, publish, distribute, sub -# license, and/or sell copies of the Software, and to permit persons to whom -# the Software is furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice (including the next -# paragraph) shall be included in all copies or substantial portions of the -# Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL -# IBM AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -# DEALINGS IN THE SOFTWARE. - -AM_CPPFLAGS = -I$(top_srcdir)/include -AM_CFLAGS = $(CWARNFLAGS) @PCIACCESS_CFLAGS@ - -lib_LTLIBRARIES = libpciaccess.la - -if LINUX -OS_SUPPORT = linux_sysfs.c linux_devmem.c linux_devmem.h -VGA_ARBITER = common_vgaarb.c -endif - -if FREEBSD -OS_SUPPORT = freebsd_pci.c -VGA_ARBITER = common_vgaarb_stub.c -endif - -if NETBSD -OS_SUPPORT = netbsd_pci.c -VGA_ARBITER = common_vgaarb_stub.c -endif - -if OPENBSD -OS_SUPPORT = openbsd_pci.c -# VGA Arbiter code is included in openbsd_pci.c -endif - -if SOLARIS -OS_SUPPORT = solx_devfs.c pci_tools.h -VGA_ARBITER = common_vgaarb_stub.c -endif - -if GNU -OS_SUPPORT = hurd_pci.c x86_pci.c x86_pci.h -VGA_ARBITER = common_vgaarb_stub.c -endif - -if CYGWIN -OS_SUPPORT = x86_pci.c x86_pci.h -VGA_ARBITER = common_vgaarb_stub.c -endif - -libpciaccess_la_SOURCES = common_bridge.c \ - common_iterator.c \ - common_init.c \ - common_interface.c \ - common_io.c \ - common_capability.c \ - common_device_name.c \ - common_map.c \ - pciaccess_private.h \ - $(VGA_ARBITER) \ - $(OS_SUPPORT) - -libpciaccess_la_LIBADD = $(PCIACCESS_LIBS) - -libpciaccess_la_LDFLAGS = -version-number 0:11:1 -no-undefined - -EXTRA_DIST = meson.build
\ No newline at end of file |