# 使用 Homebrew, apk, dnf, MacPorts, Nix, pacman, zypper, apt 安装 gtk-doc

查看 gtk-doc 的安装路径、可执行文件、元数据以及面向 AI 代理工作流的安全说明。

## 安装

```sh
sudo av install brew:gtk-doc
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install gtk-doc
```

  证据: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install gtk-doc
```

  证据: MacPorts ports tree: gnome/gtk-doc/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1

### Linux

- apk (92%):

```sh
sudo apk add gtk-doc
```

  证据: Alpine Linux edge package indexes: gtk-doc from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz

- dnf (92%):

```sh
sudo dnf install gtk-doc
```

  证据: Fedora Rawhide package metadata: gtk-doc from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/210a2053c8e007daf9ae39c2a21daaed9b2ddd07d63ecffa597050361e73650c-primary.xml.zst

- Nix (92%):

```sh
nix profile install nixpkgs#gtk-doc
```

  证据: nixpkgs package indexes: pkgs/by-name/gt/gtk-doc/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1

- pacman (92%):

```sh
sudo pacman -S gtk-doc
```

  证据: Arch Linux sync databases: gtk-doc from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz

- zypper (92%):

```sh
sudo zypper install gtk-doc
```

  证据: openSUSE Tumbleweed package metadata: gtk-doc from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst

- Debian apt (92%):

```sh
sudo apt install gtk-doc-tools
```

  证据: Debian stable package indexes: gtk-doc-tools from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz

## 软件包事实

- **软件包键:** brew:gtk-doc
- **软件包管理器:** Homebrew
- **软件包管理器页面:** <https://formulae.brew.sh/formula/gtk-doc>
- **版本:** 1.36.1
- **来源摘要:** GTK+ documentation tool
- **主页:** <https://gitlab.gnome.org/GNOME/gtk-doc>
- **上游文档:** <https://gitlab.gnome.org/GNOME/gtk-doc>
- **许可证:** GPL-2.0-or-later
- **源码归档:** <https://download.gnome.org/sources/gtk-doc/1.36/gtk-doc-1.36.1.tar.xz>
- **已生成:** 2026-08-04T22:13:35+00:00

## 可执行文件

- gtkdoc-check (cli)
- gtkdoc-depscan (cli)
- gtkdoc-fixxref (cli)
- gtkdoc-mkdb (cli)
- gtkdoc-mkhtml (cli)
- gtkdoc-mkhtml2 (cli)
- gtkdoc-mkman (cli)
- gtkdoc-mkpdf (cli)
- gtkdoc-rebase (cli)
- gtkdoc-scan (cli)
- gtkdoc-scangobj (cli)
- gtkdocize (cli)
- gtkdoc-check (别名)
- gtkdoc-depscan (别名)
- gtkdoc-fixxref (别名)
- gtkdoc-mkdb (别名)
- gtkdoc-mkhtml (别名)
- gtkdoc-mkhtml2 (别名)
- gtkdoc-mkman (别名)
- gtkdoc-mkpdf (别名)
- gtkdoc-rebase (别名)
- gtkdoc-scan (别名)
- gtkdoc-scangobj (别名)
- gtkdocize (别名)

## 依赖

- docbook
- docbook-xsl
- python@3.14

## 构建依赖

- meson
- ninja
- pkgconf

## macOS 提供的库

- libxml2
- libxslt

## 安装行为

- post-install 钩子: 未定义
- Bottle: 可用 于 arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux

## 版本和新鲜度

- 页面生成时间: 2026-08-04
- 管理器版本: 1.36.1
- 本地数据: OK
- 上游仓库: https://gitlab.gnome.org/GNOME/gtk-doc
- 信息: No package-manager update timestamp was available.
- 信息: Release/tag comparison is only available for GitHub repositories.
## 项目历史与用法

GTK-Doc is a documentation generator for C APIs, especially GLib, GObject, GTK, and GNOME-style libraries. It extracts structured comments from C code, understands GObject signals and properties, produces DocBook XML, and transforms that output into HTML and other formats.

For package maintainers, GTK-Doc is the build-time tool that explains why GNOME library packages often have optional documentation flags, gtkdocize steps, DocBook dependencies, scanner binaries, and generated API reference artifacts.

### 项目历史

The GTK-Doc repository has a 'start' tag dated 1998-11-24 and a GTK_DOC_1_0 tag dated 2003-01-20. The GNOME source archive also lists gtk-doc-1.0 tarballs dated 2003-01-20, giving a fixed early release anchor.

The project README says GTK-Doc is used to document C code, typically the public API of libraries such as GLib-based libraries, but also application code. It also notes that GTK-Doc was not originally intended as a general-purpose documentation tool and points to Doxygen for that broader role.

The project evolved from a DocBook-oriented GNOME documentation pipeline into a Python/Meson-era maintenance tool. The NEWS file records Python 3-related changes, an experimental gtkdoc-mkhtml2 toolchain in 1.30, Python 3 requirements in 1.29, and the removal of Autotools as a way to build GTK-Doc itself in 1.36.0.

### 采用历史

GTK-Doc was adopted across the GNOME C library ecosystem because it understands GObject-specific concepts that generic C documentation tools may not: signals, properties, object scanners, and conventions used by GTK widgets and GObject classes.

The archived GNOME GtkDoc page describes it as a tool for extracting API documentation from C code like Doxygen, with special support for GObject, and describes HTML output by default with PDF and man-page output possible with extra work. GNOME project pages and coding-practice material refer to GTK-Doc annotations as part of documenting public C APIs.

### 使用方式

A project using GTK-Doc writes documentation blocks in C comments, keeps section and symbol metadata, runs tools such as gtkdoc-scan, gtkdoc-scangobj, gtkdoc-mkdb, gtkdoc-mkhtml, gtkdoc-fixxref, gtkdoc-mkman, gtkdoc-mkpdf, and often integrates gtkdocize with Autotools-era projects or Meson build definitions.

The README describes generated HTML as browsable in a normal browser or in Devhelp. The manual/wiki workflow also explains the package's role in local developer environments: it is not just a documentation renderer, but a scanner and cross-reference pipeline used while building source distributions.

### 为什么软件包爱好者会关心

GTK-Doc is a classic build dependency that users may never run directly but packagers recognize instantly. Enabling API docs in a GNOME library can pull in GTK-Doc, DocBook DTDs, DocBook XSL stylesheets, libxml2/libxslt, Python modules, and sometimes PDF tooling such as dblatex.

Its long tail matters because old projects may still expect gtkdocize and Autotools integration, while the GTK-Doc project itself moved its own build to Meson. That split between being built with Meson and still supporting Autotools integration in downstream projects is package-maintainer lore.

### 时间线

- 1998: GTK-Doc repository has a start tag.
- 2003: GTK-Doc 1.0 tag and GNOME source tarballs appeared.
- 2018: GTK-Doc 1.29 NEWS records Python 3 requirement changes.
- 2019: GTK-Doc 1.30 NEWS records Pygments use and an experimental gtkdoc-mkhtml2 toolchain.
- 2020: GTK-Doc 1.33.0 NEWS records reproducible-build and GTK action documentation support.
- 2026: GTK-Doc 1.36.0 NEWS records that GTK-Doc can no longer be built with Autotools, while Autotools integration files remain for downstream projects.

### Related projects

- GTK, GLib, GObject, GNOME libraries, Devhelp, DocBook, libxml2, libxslt, Meson, and Autotools are the central related projects in GTK-Doc's package history.
- gi-docgen is the related GNOME documentation generator associated with GObject Introspection-era API reference publishing; archived GNOME pages describe efforts to generate documentation from introspection data as a successor direction for parts of the GTK-Doc role.

### 来源

- <https://download.gnome.org/sources/gtk-doc/1.0/>
- <https://gitlab.gnome.org/GNOME/gtk-doc>
- <https://gitlab.gnome.org/GNOME/gtk-doc/-/raw/master/NEWS>
- <https://gitlab.gnome.org/GNOME/gtk-doc/-/raw/master/README.md>
- <https://gitlab.gnome.org/api/v4/projects/GNOME%2Fgtk-doc/repository/tags?per_page=100>
- <https://wiki.gnome.org/DocumentationProject/GtkDoc>


## 安全说明

narrow executable package without higher-risk signals.

- **Geiger 风险:** 绿色 / 低
- narrow executable package without higher-risk signals

## 源数据库详情

- **Source Database:** Homebrew formula API
- **Tap:** homebrew/core
- **Full Name:** gtk-doc
- **Version Scheme:** 0
- **Revision:** 1
- **Bottle Stable Root URL:** <https://ghcr.io/v2/homebrew/core>
- **Deprecated:** no
- **Disabled:** no
- **Keg Only:** no
- **URL Keys:** stable

## 其他软件包管理器记录

- Debian apt - gtk-doc-tools - 1.34.0-2: normalized package name match | Debian stable package indexes: gtk-doc-tools from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | GTK+ documentation tools | https://gitlab.gnome.org/GNOME/gtk-doc/
- Nix - gtk-doc: normalized package name match | nixpkgs package indexes: pkgs/by-name/gt/gtk-doc/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- Ubuntu apt - gtk-doc-tools - 1.34.0-1: normalized package name match | Ubuntu 24.04 LTS package indexes: gtk-doc-tools from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | GTK+ documentation tools | https://gitlab.gnome.org/GNOME/gtk-doc/
- apk - gtk-doc - 1.36.0-r1: normalized package name match | Alpine Linux edge package indexes: gtk-doc from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | Documentation tool for public library API | https://gitlab.gnome.org/GNOME/gtk-doc
- dnf - gtk-doc - 1.36.1-3.fc45: normalized package name match | Fedora Rawhide package metadata: gtk-doc from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/210a2053c8e007daf9ae39c2a21daaed9b2ddd07d63ecffa597050361e73650c-primary.xml.zst | API documentation generation tool for GTK+ and GNOME | https://gitlab.gnome.org/GNOME/gtk-doc/
- pacman - gtk-doc - 1.36.1-1: normalized package name match | Arch Linux sync databases: gtk-doc from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz | Documentation tool for public library API | https://gitlab.gnome.org/GNOME/gtk-doc
- zypper - gtk-doc - 1.36.1-1.2: normalized package name match | openSUSE Tumbleweed package metadata: gtk-doc from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst | GTK+ Documentation Generator | http://www.gtk.org/gtk-doc/
- zypper - gtk-doc-mkpdf - 1.36.1-1.2: normalized package name match | openSUSE Tumbleweed package metadata: gtk-doc-mkpdf from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst | Gtkdoc PDF Generator | http://www.gtk.org/gtk-doc/
- MacPorts - gtk-doc: normalized package name match | MacPorts ports tree: gnome/gtk-doc/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1


## 相关链接

- [Terminal utility packages](https://pkg.so/zh-hans/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Text processing packages](https://pkg.so/zh-hans/text-processing-tools/) - Matched text, document, or structured-data processing metadata.
- [Developer build packages](https://pkg.so/zh-hans/developer-build-tools/) - Matched build, compiler, generator, or developer workflow metadata.
- [Networking and protocol packages](https://pkg.so/zh-hans/networking-protocol-tools/) - Matched network, protocol, or remote-service metadata.
- [python@3.14](https://pkg.so/zh-hans/brew/python-3-14/) - Runtime dependency declared by Homebrew.
- [docbook](https://pkg.so/zh-hans/brew/docbook/) - Runtime dependency declared by Homebrew.
- [docbook-xsl](https://pkg.so/zh-hans/brew/docbook-xsl/) - Runtime dependency declared by Homebrew.
- [pkgconf](https://pkg.so/zh-hans/brew/pkgconf/) - Build dependency declared by Homebrew.
- [ninja](https://pkg.so/zh-hans/brew/ninja/) - Build dependency declared by Homebrew.
- [meson](https://pkg.so/zh-hans/brew/meson/) - Build dependency declared by Homebrew.
- [glib](https://pkg.so/zh-hans/brew/glib/) - Shares pkgdb curated category or tags: c, cli, developer-tools, gnome, gtk.
- [pango](https://pkg.so/zh-hans/brew/pango/) - Shares pkgdb curated category or tags: cli, developer-tools, gnome, gtk.
- [gtk+3](https://pkg.so/zh-hans/brew/gtk-3/) - Shares pkgdb curated category or tags: cli, developer-tools, gnome, gtk.
- [gtk4](https://pkg.so/zh-hans/brew/gtk4/) - Shares pkgdb curated category or tags: cli, developer-tools, gnome, gtk.
- [doxygen](https://pkg.so/zh-hans/brew/doxygen/) - Shares pkgdb curated category or tags: api-docs, cli, developer-tools, documentation.
- [json-glib](https://pkg.so/zh-hans/brew/json-glib/) - Shares pkgdb curated category or tags: c, cli, developer-tools, gnome.
- [vte3](https://pkg.so/zh-hans/brew/vte3/) - Shares pkgdb curated category or tags: cli, developer-tools, gnome, gtk.
- [gspell](https://pkg.so/zh-hans/brew/gspell/) - Shares pkgdb curated category or tags: cli, developer-tools, gnome, gtk.
- [yelp-tools](https://pkg.so/zh-hans/brew/yelp-tools/) - Both packages touch the same language runtime or ecosystem. Shared terms: check, cli, developer, developer-tools, docbook.
- [libdazzle](https://pkg.so/zh-hans/brew/libdazzle/) - Local package facts share a topical domain. Shared terms: cli, developer, developer-tools, gnome, gtk.

## Combined YAML source

View the package source record on GitHub. [combined/gtk-doc.yml](https://github.com/mxcl/pkgdb/blob/main/combined/gtk-doc.yml)


## 来源

- pkg.so package database
- Geiger risk classifier
- package-page enrichment
- curated package history
- package version freshness
- pkgdb category and tag curation
- package relationship graph
- external package-manager database matches
- cross-ecosystem install command graph
