# tradcpp を Homebrew, MacPorts, Nix でインストール

tradcpp のインストール経路、実行ファイル、メタデータ、AI エージェント向けセキュリティノートを確認します。

## インストール

```sh
sudo av install brew:tradcpp
```

追加のインストールコマンド:

### macOS

- Homebrew (100%):

```sh
brew install tradcpp
```

  証拠: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install tradcpp
```

  証拠: MacPorts ports tree: devel/tradcpp/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1

### Linux

- Nix (92%):

```sh
nix profile install nixpkgs#tradcpp
```

  証拠: nixpkgs package indexes: pkgs/by-name/tr/tradcpp/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1

## パッケージ情報

- **パッケージキー:** brew:tradcpp
- **パッケージマネージャ:** Homebrew
- **バージョン:** 0.5.3
- **ソース概要:** K&R-style C preprocessor
- **ホームページ:** <https://www.netbsd.org/~dholland/tradcpp/>
- **生成日時:** 2026-08-03T19:37:03+00:00

## 実行可能ファイル

- tradcpp (エイリアス)

## インストール挙動

- Bottle: 利用不可

## バージョンと鮮度

- ページ生成日: 2026-08-03
- マネージャ版: 0.5.3
## プロジェクトの歴史と使われ方

tradcpp is a small traditional, K&R-style C preprocessor maintained from David Holland's NetBSD pages. Its history is tied less to compiling C and more to preserving old build techniques that used cpp as a general text preprocessor.

### プロジェクトの歴史

The official tradcpp page says the tool was written for historical uses of the C preprocessor on non-C input, because modern compiler-bundled preprocessors increasingly do not provide a traditional mode or preserve the behavior old build systems expect. The project deliberately keeps a narrow scope and does not try to become a full modern C89/C99/C11 preprocessor.

A distinctive implementation goal is whitespace preservation. The author calls out makefiles, old Emacs build logic, and imake as examples where rearranging whitespace can break legacy systems. tradcpp also includes a trace mode for diagnosing complex preprocessor use; the page says it was written to investigate an imake problem on Solaris.

### 採用の歴史

The most explicit adoption history is in pkgsrc: the official page says pkgsrc, the NetBSD package system, has used tradcpp for these purposes since 2013. That makes tradcpp a package-system support tool rather than a broad end-user application.

### 使われ方

In package-manager culture, tradcpp is used when a build recipe needs a traditional cpp that preserves old preprocessing behavior for files such as makefiles. Users are explicitly steered away from using it for normal modern C code.

### パッケージ好きにとっての重要性

tradcpp matters to package nerds because it is infrastructure for keeping old source packages buildable. It represents the unglamorous compatibility layer a portability framework like pkgsrc sometimes needs when upstream build systems rely on historical Unix behavior.

### タイムライン

- 2013: pkgsrc begins using tradcpp for legacy preprocessing use cases.
- Current official release: tradcpp 0.5.3 is listed on the NetBSD-hosted project page.

### Related projects

- pkgsrc uses tradcpp for package builds with legacy preprocessing needs.
- imake and old Emacs build systems are named by the author as examples of the historical cpp usage tradcpp was designed to support.

### ソース

- <https://www.netbsd.org/~dholland/tradcpp - official project page describing purpose, pkgsrc use since 2013, trace mode, release, and Mercurial repository.>


## セキュリティノート

narrow executable package without higher-risk signals.

- **Geiger リスク:** グリーン / 低
- narrow executable package without higher-risk signals

## 他のパッケージマネージャ記録

- Nix - tradcpp: normalized package name match | nixpkgs package indexes: pkgs/by-name/tr/tradcpp/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- MacPorts - tradcpp: normalized package name match | MacPorts ports tree: devel/tradcpp/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1


## Combined YAML source

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


## ソース

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