Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
rjeczalik committed May 31, 2014
1 parent d4a343f commit 5d3269a
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 12 deletions.
16 changes: 13 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,14 @@
pkgconfig
=========
## cmd/pkg-config [![GoDoc](https://godoc.org/github.com/rjeczalik/pkgconfig/cmd/pkg-config?status.png)](https://godoc.org/github.com/rjeczalik/pkgconfig/cmd/pkg-config)

Go-centric and GOPATH-aware pkg-config replacement for use with the cgo tool.
Go-centric and GOPATH-aware pkg-config replacement for a use with the cgo tool.

Installation

```
$ go get github.com/rjeczalik/pkgconfig/cmd/pkg-config
$ go install github.com/rjeczalik/pkgconfig/cmd/pkg-config
```

Documentation

[godoc.org/github.com/rjeczalik/pkgconfig/cmd/pkg-config](https://godoc.org/github.com/rjeczalik/pkgconfig/cmd/pkg-config)
17 changes: 8 additions & 9 deletions cmd/pkg-config/main.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// cmd/pkg-config is a Go-centric and GOPATH-aware pkg-config replacement
// for use with the cgo tool.
//
// Using cmd/pkg-config with the cgo command
// ** Using cmd/pkg-config with the cgo command **
//
// To use cmd/pkg-config go install it and ensure it's in the PATH. A NOTE for
// Linux users: the cmd/pkg-config must be present before original
Expand Down Expand Up @@ -47,7 +47,7 @@
// The cmd/pkg-config tool looks up for a PC file in two other places in addition
// do the original pkg-config: $GOPATH and github.com.
//
// The cmd/pkg-config tool and $GOPATH
// ** The cmd/pkg-config tool and $GOPATH **
//
// The cmd/pkg-config defines standard directory layout for C libraries:
//
Expand Down Expand Up @@ -93,7 +93,7 @@
// Libs.private: -lz -lm
// Cflags: -I${includedir}
//
// The cmd/pkg-config tool and github.com
// ** The cmd/pkg-config tool and github.com **
//
// Although it's advised to always use an official or self-compiled libraries for
// a production use, cmd/pkg-config can download a zip archive from project's
Expand Down Expand Up @@ -133,10 +133,10 @@ const USAGE = `NAME:
pkg-config - Go-centric pkg-config replacement
USAGE:
pkg-config --libs PKG
pkg-config --cflags PKG
pkg-config --cflags --libs PKG1 PKG2
pkg-config get github.com/USER/PROJ PKG`
pkg-config --libs LIB
pkg-config --cflags LIB
pkg-config --cflags --libs LIB1 LIB2
pkg-config get github.com/USER/PROJECT LIB`

func die(v ...interface{}) {
for _, v := range v {
Expand All @@ -158,11 +158,10 @@ func main() {
if len(os.Args) != 4 {
die(USAGE)
}
pc, err := pkgconfig.LookupGithubProj(os.Args[3], os.Args[2])
_, err := pkgconfig.LookupGithubProj(os.Args[3], os.Args[2])
if err != nil {
die(err)
}
_ = pc
default:
pkg := pkgconfig.NewPkgArgs(os.Args[1:])
if err := pkg.Resolve(); err == nil {
Expand Down

0 comments on commit 5d3269a

Please sign in to comment.