- pkg-config
- Как это работает
- Ссылки
- Полезное
- Смотреть что такое «pkg-config» в других словарях:
- pkgconfig 1.5.5
- Navigation
- Project links
- Statistics
- Classifiers
- Project description
- Changelog
- Version 1.5.4
- Version 1.5.3
- Version 1.5.2
- Version 1.5.0
- Version 1.4.0
- Version 1.3.1
- Version 1.3.0
- Version 1.2.1 and 1.2.2
- Version 1.2.0
- Version 1.1.0
- Version 1.0.0
- Project details
- Project links
- Statistics
- Classifiers
- Release history Release notifications | RSS feed
- Download files
- Expanding PKGs on macOS
- Extracting the Package Contents
- The MacPorts Project
- Quickstart
- Installing MacPorts
- macOS Package (.pkg) Installer
- Source Installation
- Git Sources
- Selfupdate
- Other Platforms
pkg-config
James Henstridge; переписана Хэвоком Пеннингтоном
2006-12-11 ; 2192 days ago or earlier
0.27 (11 июля 2012)
pkg-config — компьютерная программа, предоставляющая общий интерфейс для получения информации об установленных программных библиотеках с целью компиляции программ из исходного кода. pkg-config первоначально была разработана для Linux, но сейчас доступна и в других операционных средах: BSD, Microsoft Windows, Mac OS X и Solaris.
Эта программа выводит информацию об установленных библиотеках, которая включает в себя:
Как это работает
При установке библиотеки с помощью менеджера пакетов (к примеру RPM или deb), в специальную директорию помещается .pc файл (точное положение директории зависит от Вашей системы. Его можно выяснить с помощью команды man pkg-config). Данный файл содержит несколько записей.
Эти записи, как правило, содержат список библиотек и заголовочных файлов, которые могут потребоваться при компиляции других программ. Кроме того, в них может содержаться версия библиотеки и её описание.
Ниже приведён пример .pc файла для libpng:
В этом примере в файле описаны пути к библиотекам (/usr/local/lib) и их заголовочным файлам в (/usr/local/include). Также в нём описано название библиотеки (libpng) и его версия (1.2.8). Кроме всего прочего, в файле описаны дополнительные опции компилятора и компоновщика, которые понадобятся при компиляции программ.
При сборке программы удобно использовать pkg-config следующим образом:
Ссылки
Wikimedia Foundation . 2010 .
Полезное
Смотреть что такое «pkg-config» в других словарях:
pkg-config — Aktuelle Version 0.25 (Mai 2010) Programmiersprache C Kategorie Programmierwerkzeug Lizenz GPL … Deutsch Wikipedia
Pkg-config — (von engl. package, „Paket“ und config, „Konfiguration“) ist ein Computerprogramm, das eine einheitliche Schnittstelle zur Abfrage von Metadaten über beliebige Software bereitstellt. pkg config wird in erster Linie für die Versionsverwaltung… … Deutsch Wikipedia
Pkg-config — Développeur Tollef Fog Heen / freedesktop.org Écrit en … Wikipédia en Français
Pkg-config — Saltar a navegación, búsqueda pkg config es un software de ordenador que provée una interfaz unificada para llamar librerías instaladas cuando se está compilando un programa a partir del código fuente. pkg config fue diseñado originalmente para… … Wikipedia Español
Pkg-config — is a piece of computer software that provides a unified interface for querying installed libraries for the purpose of compiling software from its source code. pkg config was originally designed for Linux but is now also available for the various… … Wikipedia
Autoconf — Programmablaufplan von autoconf und automake, zwei Tools im GNU Build System Das GNU Build System, auch bekannt als Autotools, ist eine Sammlung von Tools für die Computerprogrammierung, die vom GNU Projekt entwickelt wurden. Diese Tools sind für … Deutsch Wikipedia
Autoheader — Programmablaufplan von autoconf und automake, zwei Tools im GNU Build System Das GNU Build System, auch bekannt als Autotools, ist eine Sammlung von Tools für die Computerprogrammierung, die vom GNU Projekt entwickelt wurden. Diese Tools sind für … Deutsch Wikipedia
Automake — Programmablaufplan von autoconf und automake, zwei Tools im GNU Build System Das GNU Build System, auch bekannt als Autotools, ist eine Sammlung von Tools für die Computerprogrammierung, die vom GNU Projekt entwickelt wurden. Diese Tools sind für … Deutsch Wikipedia
Autotools — Programmablaufplan von autoconf und automake, zwei Tools im GNU Build System Das GNU Build System, auch bekannt als Autotools, ist eine Sammlung von Tools für die Computerprogrammierung, die vom GNU Projekt entwickelt wurden. Diese Tools sind für … Deutsch Wikipedia
Configure — Programmablaufplan von autoconf und automake, zwei Tools im GNU Build System Das GNU Build System, auch bekannt als Autotools, ist eine Sammlung von Tools für die Computerprogrammierung, die vom GNU Projekt entwickelt wurden. Diese Tools sind für … Deutsch Wikipedia
Источник
pkgconfig 1.5.5
pip install pkgconfig Copy PIP instructions
Released: Jul 19, 2021
Interface Python with pkg-config
Navigation
Project links
Statistics
View statistics for this project via Libraries.io, or by using our public dataset on Google BigQuery
License: MIT License (MIT)
Requires: Python >=3.3, Matthias.Vogelgesang
Classifiers
- Development Status
- 5 — Production/Stable
- Intended Audience
- Developers
- License
- OSI Approved :: MIT License
- Operating System
- OS Independent
- Programming Language
- Python :: 3
- Python :: 3.4
- Python :: 3.5
- Python :: 3.6
- Python :: 3.7
- Python :: 3.8
- Python :: 3.9
- Topic
- Software Development :: Build Tools
Project description
pkgconfig is a Python module to interface with the pkg-config command line tool for Python 3.3+.
It can be used to
find all pkg-config packages
check if a package exists
check if a package meets certain version requirements
return the version
query CFLAGS and LDFLAGS
get all variables defined for a package:
parse the output to build extensions with setup.py
The pkgconfig.parse function returns a dictonary of lists. The lists returned are accurate representations of the equivalent pkg-config call’s result, both in content and order.
If pkg-config is not on the path, raises EnvironmentError.
The pkgconfig module is licensed under the MIT license.
Changelog
Version 1.5.4
- Adjust pyproject.toml and drop Python 2 support
Version 1.5.3
Version 1.5.2
Version 1.5.0
- Use poetry instead of setuptools directly
- Fix #42: raise exception if package is missing
- Fix version parsing for openssl-like version numbers, fixes #32
- Fix #31: expose –modversion
- Fix #30: strip whitespace from variable names
Version 1.4.0
- Add boolean static keyword to output private libraries as well
- Raise original OSError as well
Version 1.3.1
- Fix compatibility problems with Python 2.6
Version 1.3.0
- Add variables() API to query defined variables
- Disable Python 3.2 and enable Python 3.5 and 3.6 tests
- Fix #16: handle spaces of values in .pc files correctly
Version 1.2.1 and 1.2.2
Bug fix releases released on December 1st and 2nd 2016.
- Include the data folder in the distribution in order to run tests
- Improve the tests
Version 1.2.0
Released on November 30th 2016.
- Potential break: switch from result set to list
- Expose –list-all query
- Added support for PKG_CONFIG environment variable
Version 1.1.0
Released on November 6th 2013.
- Multiple packages can now be parsed with a single call to .parse.
Version 1.0.0
First release on September 8th 2013.
Project details
Project links
Statistics
View statistics for this project via Libraries.io, or by using our public dataset on Google BigQuery
License: MIT License (MIT)
Requires: Python >=3.3, Matthias.Vogelgesang
Classifiers
- Development Status
- 5 — Production/Stable
- Intended Audience
- Developers
- License
- OSI Approved :: MIT License
- Operating System
- OS Independent
- Programming Language
- Python :: 3
- Python :: 3.4
- Python :: 3.5
- Python :: 3.6
- Python :: 3.7
- Python :: 3.8
- Python :: 3.9
- Topic
- Software Development :: Build Tools
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you’re not sure which to choose, learn more about installing packages.
Источник
Expanding PKGs on macOS
Let’s say you’re on a computer where you don’t have administrative access, but you really need to use this one piece of software. In my case, this was Apple’s SF Symbols app. There’s a pretty simple way to extract the payload from the package (.PKG).
To get started, you first need two things. A macOS-equipped computer and a DMG with a PKG inside, or just a PKG. This tutorial will detail both.
Extracting the Package Contents
If your PKG is inside of a DMG, start here.
To extract the payload from a PKG inside of a DMG, we need to mount the DMG. There are two ways to do this. You can either use the Finder (double-click the DMG to mount it) or use the terminal with the following command:
Now is where we have to use the terminal. In your terminal, navigate to the folder just above where you want your PKG to be extracted. An example command is as follows:
You can then proceed to extract the PKG with:
The snippet below is what my terminal looked like after extracting the package to the “extracted_package” folder.
To see what is inside of the payload, type:
The open $(pwd) command opens the current directory with the Finder.
The folder hierarchy of the Payload folder is very simple. The directories are the places to put the files. For example, the directory Applications has “SF Symbols.app”, because that needs to be put in the Applications folder on your computer.
Once you have extracted the Payload, you can eject the volume (if you are using a DMG) or delete the PKG, as you no longer need it.
Источник
The MacPorts Project
Quickstart
- Install Xcode and the Xcode Command Line Tools
- Agree to Xcode license in Terminal: sudo xcodebuild -license
- Install MacPorts for your version of the Mac operating system:
- macOS Big Sur v11
- macOS Catalina v10.15
- macOS Mojave v10.14
- Older OS? See here.
Installing MacPorts
MacPorts version 2.7.1 is available in various formats for download and installation (note, if you are upgrading to a new major release of macOS, see the migration info page):
- “pkg” installers for Big Sur, Catalina, and Mojave, for use with the macOS Installer. This is the simplest installation procedure that most users should follow after meeting the requirements listed below. Installers for legacy platforms High Sierra, Sierra, El Capitan, Yosemite, Mavericks, Mountain Lion, Lion, Snow Leopard, Leopard and Tiger are also available.
- In source form as either a tar.bz2 package or a tar.gz one for manual compilation, if you intend to customize your installation in any way.
- Git clone of the unpackaged sources, if you wish to follow MacPorts development.
- The selfupdate target of the port(1) command, for users who already have MacPorts installed and wish to upgrade to a newer release.
Checksums for our packaged downloads are contained in the corresponding checksums file.
The public key to verify the detached GPG signatures can be found under the attachments section on jmr’s wiki page. (Direct Link).
Please note that in order to install and run MacPorts on macOS, your system must have installations of the following components:
Apple’s Xcode Developer Tools (version 12.2 or later for Big Sur, 11.3 or later for Catalina, 10.0 or later for Mojave, 9.0 or later for High Sierra, 8.0 or later for Sierra, 7.0 or later for El Capitan, 6.1 or later for Yosemite, 5.0.1 or later for Mavericks, 4.4 or later for Mountain Lion, 4.1 or later for Lion, 3.2 or later for Snow Leopard, or 3.1 or later for Leopard), found at the Apple Developer site, on your Mac operating system installation CDs/DVD, or in the Mac App Store. Using the latest available version that will run on your OS is highly recommended, except for Snow Leopard where the last free version, 3.2.6, is recommended.
With Xcode 4 and later, users need to accept the Xcode EULA by either launching Xcode or running:
Apple’s Command Line Developer Tools, which can be installed on recent OS versions by running this command in the Terminal:
Older versions are found at the Apple Developer site, or they can be installed from within Xcode back to version 4. Users of Xcode 3 or earlier can install them by ensuring that the appropriate option(s) are selected at the time of Xcode’s install («UNIX Development», «System Tools», «Command Line Tools», or «Command Line Support»).
- Install the xorg-server port from MacPorts (recommended).
- The XQuartz Project provides a complete X11 release for macOS including server and client libraries and applications.
- Apple’s X11.app is provided by the “X11 User” package on older OS versions. It is always installed on Lion, and is an optional installation on your system CDs/DVD with previous OS versions.
macOS Package (.pkg) Installer
The easiest way to install MacPorts on a Mac is by downloading the pkg or dmg for Big Sur, Catalina, Mojave, High Sierra, Sierra, El Capitan, Yosemite, Mavericks, Mountain Lion, Lion, Snow Leopard, Leopard or Tiger and running the system’s Installer by double-clicking on the pkg contained therein, following the on-screen instructions until completion.
This procedure will place a fully-functional and default MacPorts installation on your host system, ready for usage. If needed your shell configuration files will be adapted by the installer to include the necessary settings to run MacPorts and the programs it installs, but you may need to open a new shell for these changes to take effect.
The MacPorts “ selfupdate ” command will also be run for you by the installer to ensure you have our latest available release and the latest revisions to the “Portfiles” that contain the instructions employed in the building and installation of ports. After installation is done, it is recommended that you run this step manually on a regular basis to to keep your MacPorts system always current:
At this point you should be ready to enjoy MacPorts!
Type “ man port ” at the command line prompt and/or browse over to our Guide to find out more information about using MacPorts. Help is also available.
Source Installation
If on the other hand you decide to install MacPorts from source, there are still a couple of things you will need to do after downloading the tarball before you can start installing ports, namely compiling and installing MacPorts itself:
- “ cd ” into the directory where you downloaded the package and run “ tar xjvf MacPorts-2.7.1.tar.bz2 ” or “ tar xzvf MacPorts-2.7.1.tar.gz ”, depending on whether you downloaded the bz2 tarball or the gz one, respectively.
- Build and install the recently unpacked sources:
- cd MacPorts-2.7.1
- ./configure && make && sudo make install
Optionally:
- cd ../
- rm -rf MacPorts-2.7.1*
These steps need to be perfomed from an administrator account, for which “ sudo ” will ask the password upon installation. This procedure will install a pristine MacPorts system and, if the optional steps are taken, remove the as of now unnecessary MacPorts-2.7.1 source directory and corresponding tarball.
To customize your installation you should read the output of “ ./configure —help | more ” and pass the appropriate options for the settings you wish to tweak to the configuration script in the steps detailed above.
You will need to manually adapt your shell’s environment to work with MacPorts and your chosen installation prefix (the value passed to configure ‘s —prefix flag, defaulting to /opt/local ):
- Add $
/bin and $ /sbin to the start of your PATH environment variable so that MacPorts-installed programs take precedence over system-provided programs of the same name. - If a standard MANPATH environment variable already exists (that is, one that doesn’t contain any empty components), add the $
/share/man path to it so that MacPorts-installed man pages are found by your shell. - For Tiger and earlier only, add an appropriate X11 DISPLAY environment variable to run X11-dependent programs, as Leopard takes care of this requirement on its own.
Lastly, you need to synchronize your installation with the MacPorts rsync server:
Upon completion MacPorts will be ready to install ports!
It is recommended to run the above command on a regular basis to keep your installation current. Type “ man port ” at the command line prompt and/or browse over to our Guide to find out more information about using MacPorts. Help is also available.
Git Sources
If you are developer or a user with a taste for the bleeding edge and wish for the latest changes and feature additions, you may acquire the MacPorts sources through git. See the Guide section on installing from git.
Purpose-specific branches are also available at the https://github.com/macports/macports-base/branches url.
Alternatively, if you’d simply like to view the git repository without checking it out, you can do so via the GitHub web interface.
Selfupdate
If you already have MacPorts installed and have no restrictions to use the rsync networking protocol (tcp port 873 by default), the easiest way to upgrade to our latest available release, 2.7.1, is by using the selfupdate target of the port(1) command. This will both update your ports tree (by performing a sync operation) and rebuild your current installation if it’s outdated, preserving your customizations, if any.
Other Platforms
Running on platforms other than macOS is not the main focus of The MacPorts Project, so remaining cross-platform is not an actively-pursued development goal. Nevertheless, it is not an actively-discouraged goal either and as a result some experimental support does exist for other POSIX-compliant platforms such as *BSD and GNU/Linux.
The full list of requirements to run MacPorts on these other platforms is as follows (we assume you have the basics such as GCC and X11):
- Tcl (8.4 or 8.5), with threads.
- mtree for directory hierarchy.
- rsync for syncing the ports.
- cURL for downloading distfiles.
- SQLite for the port registry.
- GNUstep (Base), for Foundation (optional, can be disabled via configure args).
- OpenSSL for signature verification, and optionally for checksums. libmd may be used instead for checksums.
Normally you must install from source or from an git checkout to run MacPorts on any of these platforms.
Help on a wide variety of topics is also available in the project Guide and through our Trac portal should you run into any problems installing and/or using MacPorts. Of particular relevance are the installation & usage sections of the former and the FAQ section of the Wiki, where we keep track of questions frequently fielded on our mailing lists.
If any of these resources do not answer your questions or if you need any kind of extended support, there are many ways to contact us!
Copyright © 2002–2021, The MacPorts Project. All rights reserved.
Источник