Skip to content
This repository has been archived by the owner on Jul 4, 2023. It is now read-only.

ossp-uuid patch pkg-config to use configured dirs #43889

Closed
wants to merge 1 commit into from

Conversation

bluca
Copy link

@bluca bluca commented Sep 13, 2015

Patch ossp-uuid/uuid.pc.in to use the configure directories for includes. Also bump revision from 1 to 2.
Unfortunately from the look of upstream's CVS repository it seems it has been inactive for years, so I'm afraid the chances of a new release are quite low.

Tested on Debian via LinuxBrew:

$ bin/brew install ossp-uuid
Warning: Formula file is modified!
Building from source because Library/Formula/ossp-uuid.rb has local changes
To install from a bottle instead, run with --force-bottle
/usr/bin/gcc-4.2: not found (maybe gcc-4.2 is not installed?)
==> Downloading http://ftp.de.debian.org/debian/pool/main/o/ossp-uuid/ossp-uuid_1.6.2.orig.tar.gz
Already downloaded: /home/luca/.cache/Homebrew/ossp-uuid-1.6.2.tar.gz
==> Patching
patching file uuid.pc.in
==> ./configure --prefix=/home/luca/git/linuxbrew/Cellar/ossp-uuid/1.6.2_2 --includedir=/home/luca/git/linuxbrew/Cella
==> make
==> make install
/home/luca/git/linuxbrew/Cellar/ossp-uuid/1.6.2_2: 16 files, 292K, built in 4 seconds
$ PKG_CONFIG_PATH=/home/luca/git/linuxbrew/Cellar/ossp-uuid/1.6.2_2/lib/pkgconfig pkg-config --libs --cflags uuid
-I/home/luca/git/linuxbrew/Cellar/ossp-uuid/1.6.2_2/include/ossp -L/home/luca/git/linuxbrew/Cellar/ossp-uuid/1.6.2_2/lib -luuid

pkg-config now returns correctly <...>include/ossp instead of <...>/include.

Fixes issue #43843, upstream ticket: http://cvs.ossp.org/tktview?tn=200

@@ -32,4 +32,20 @@ def install
system "make"
system "make", "install"
end

patch :DATA
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line should go above the install block, and the explanatory comments should go above it.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed, thanks.

# patch: upstream ticket: http://cvs.ossp.org/tktview?tn=200
# pkg-config --cflags uuid returns the wrong directory since we override the
# default, but uuid.pc.in does not use it
patch :DATA
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can use an inreplace here rather than a patch. It's a bit neater.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done, thanks.

@bluca bluca force-pushed the ossp-uuid-pkg-config branch 2 times, most recently from 0e03960 to 982433c Compare September 14, 2015 11:18
@bluca
Copy link
Author

bluca commented Sep 15, 2015

Testing locally via LinuxBrew, looks like failure to build RPM is unrelated to this diff. The error happens when building the internal version of BeeCrypt, and it's due to the march=core2 being set by default. Adding:

ENV['CFLAGS'] = '-march=x86-64'
ENV['CXXFLAGS'] = '-march=x86-64'

to rpm.rb fixes the build issue.

Any suggestions?

@tdsmith
Copy link
Contributor

tdsmith commented Apr 10, 2016

@BrewTestBot test this please

@tdsmith tdsmith self-assigned this Apr 10, 2016
uuid is being built passing include/ossp as the headers target
install directory, but uuid.pc.in is not picking it up and as a
result pkg-config returns the wrong directory, breaking build
systems that rely on it.
@DomT4
Copy link
Member

DomT4 commented Apr 17, 2016

Merged in Homebrew/homebrew-core@8cf1f47. Thank you for your contribution to Homebrew @bluca; we appreciate it! 😺

@bluca
Copy link
Author

bluca commented Apr 17, 2016

Thanks for merging!

@bluca
Copy link
Author

bluca commented Apr 17, 2016

@DomT4 - mmh I now see this error in Travis:

$ brew update; brew install ossp-uuid binutils valgrind
==> Migrating Homebrew to v0.9.9
remote: Counting objects: 462, done.
remote: Compressing objects: 100% (420/420), done.
remote: Total 462 (delta 28), reused 273 (delta 17), pack-reused 0
Receiving objects: 100% (462/462), 745.81 KiB | 0 bytes/s, done.
Resolving deltas: 100% (28/28), done.
From https://github.com/Homebrew/brew
 + 53c5089...8e42077 master     -> origin/master  (forced update)
HEAD is now at 8e42077 list: exclude zsh completions from unbrewed
==> Tapping homebrew/core
Cloning into '/usr/local/Library/Taps/homebrew/homebrew-core'...
remote: Counting objects: 3662, done.
remote: Compressing objects: 100% (3547/3547), done.
remote: Total 3662 (delta 16), reused 480 (delta 3), pack-reused 0
Receiving objects: 100% (3662/3662), 2.79 MiB | 0 bytes/s, done.
Resolving deltas: 100% (16/16), done.
Checking connectivity... done.
Tapped 3537 formulae (3,688 files, 8.7M)
Already up-to-date.
Error: ossp-uuid-1.6.2_1 already installed
To install this version, first `brew unlink ossp-uuid`

I see no issues with linuxbrew:

$ bin/brew install ossp-uuid
Warning: Formula file is modified!
Building from source because Library/Formula/ossp-uuid.rb has local changes
To install from a bottle instead, run with --force-bottle
/usr/bin/gcc-4.2: not found (maybe gcc-4.2 is not installed?)
==> Downloading http://ftp.de.debian.org/debian/pool/main/o/ossp-uuid/ossp-uuid_1.6.2.orig.tar.gz
Already downloaded: /home/luca/.cache/Homebrew/ossp-uuid-1.6.2.tar.gz
==> ./configure --prefix=/home/luca/git/linuxbrew/Cellar/ossp-uuid/1.6.2_2 --includedir=/home/luca/git/linuxbrew/Cella
==> make
==> make install
/home/luca/git/linuxbrew/Cellar/ossp-uuid/1.6.2_2: 16 files, 292K, built in 4 seconds

Was this a mistake on my part? The commit did update the revision from 1 to 2. Any idea what's the issue?

@bluca
Copy link
Author

bluca commented Apr 17, 2016

Ah, I see, it will error out if the previous revision was already installed.

Was it a mistake to update the revision?

@DomT4
Copy link
Member

DomT4 commented Apr 17, 2016

Not particularly, in this case. As you highlighted yourself upstream is pretty much 💀 and we'd have been waiting a long time, if ever, to roll this out to users if we'd waited for that.

It's expected that if you run brew install on something that's already installed you'll get the error. Either something you're installing is pulling it in for you, or Travis pre-installs it by default which is a possibility. If you want to be error-safe there you could use brew reinstall which should plow on regardless.

@bluca
Copy link
Author

bluca commented Apr 17, 2016

Makes sense. Thanks!

@Homebrew Homebrew locked and limited conversation to collaborators Jul 10, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants