Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix UUID lib locations #138

Merged
merged 1 commit into from
Dec 4, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 22 additions & 21 deletions Formula/php-uuid.rb
Original file line number Diff line number Diff line change
@@ -1,21 +1,23 @@
class PhpUuid < Formula
desc "UUID Extension for PHP"
homepage "https://pecl.php.net/uuid"
url "https://pecl.php.net/get/uuid-1.2.0.tgz"
sha256 "5cb834d32fa7d270494aa47fd96e062ef819df59d247788562695fd1f4e470a4"
head "https://github.com/php/pecl-networking-uuid.git"

stable do
url "https://pecl.php.net/get/uuid-1.2.0.tgz"
sha256 "5cb834d32fa7d270494aa47fd96e062ef819df59d247788562695fd1f4e470a4"
patch do
# let's fix the path to uuid.h (uuid/uuid.h on linux, ossp/uuid.h on OSX)
# uuid_mac & uuid_time might not be available on OSX, let's add test to avoid compiling issue on these functions
url "https://github.com/php/pecl-networking-uuid/commit/a393861918b75d9657cb8125a4e17cebd2432c4a.patch?full_index=1"
sha256 "f72c5bd71d4c320a3bf7922104bbce959b574b79e3d504e35bccb154054f0f66"
directory "uuid-1.2.0"
end
end

depends_on "autoconf" => :build
depends_on "ossp-uuid"
depends_on "php"

patch do
# let's fix the path to uuid.h (uuid/uuid.h on linux, ossp/uuid.h on OSX)
# uuid_mac & uuid_time might not be available on OSX, let's add test to avoid compiling issue on these functions
url "https://github.com/SMillerDev/pecl-networking-uuid/commit/90a448026454af4e3b76fa514dca583a1d31d7e5.patch?full_index=1"
sha256 "c590c2045cf9837e9c97f1bfd078b615cf32d4d4c2995a793bc3691b9a0c29ee"
directory "uuid-1.2.0"
end
depends_on "util-linux"

def module_path
extension_dir = Utils.safe_popen_read("#{Formula["php"].opt_bin}/php-config", "--extension-dir").chomp
Expand All @@ -23,17 +25,16 @@
"php/#{php_basename}"
end

def install

Check warning on line 28 in Formula/php-uuid.rb

View workflow job for this annotation

GitHub Actions / test-bot (ubuntu-22.04)

`brew install --verbose --build-bottle smillerdev/tap/php-uuid` failed on Linux!

==> Fetching smillerdev/tap/php-uuid ==> Downloading https://github.com/php/pecl-networking-uuid/commit/a393861918b75d9657cb8125a4e17cebd2432c4a.patch?full_index=1 Already downloaded: /home/runner/.cache/Homebrew/downloads/c687883256ed14555a8bd9e8feda8b303a823c3113979d0a139b03f0f473adb4--a393861918b75d9657cb8125a4e17cebd2432c4a.patch ==> Verifying checksum for 'c687883256ed14555a8bd9e8feda8b303a823c3113979d0a139b03f0f473adb4--a393861918b75d9657cb8125a4e17cebd2432c4a.patch' ==> Downloading https://pecl.php.net/get/uuid-1.2.0.tgz Already downloaded: /home/runner/.cache/Homebrew/downloads/213e801733b5c637fbfad788ea9017c87246cbf4dfc8fa312f5def44fadd55fd--uuid-1.2.0.tgz ==> Verifying checksum for '213e801733b5c637fbfad788ea9017c87246cbf4dfc8fa312f5def44fadd55fd--uuid-1.2.0.tgz' ==> Installing php-uuid from smillerdev/tap /usr/bin/env tar --extract --no-same-owner --file /home/runner/.cache/Homebrew/downloads/213e801733b5c637fbfad788ea9017c87246cbf4dfc8fa312f5def44fadd55fd--uuid-1.2.0.tgz --directory /tmp/d20231204-16625-i2ocjz /usr/bin/env cp -pR /tmp/d20231204-16625-i2ocjz/package.xml /tmp/php-uuid-20231204-16625-e6ea8e/package.xml /usr/bin/env cp -pR /tmp/d20231204-16625-i2ocjz/uuid-1.2.0/. /tmp/php-uuid-20231204-16625-e6ea8e/uuid-1.2.0 ==> Patching cp -p /home/runner/.cache/Homebrew/downloads/c687883256ed14555a8bd9e8feda8b303a823c3113979d0a139b03f0f473adb4--a393861918b75d9657cb8125a4e17cebd2432c4a.patch /tmp/php-uuid--patch-20231204-16625-ygb5lp/a393861918b75d9657cb8125a4e17cebd2432c4a.patch ==> Applying a393861918b75d9657cb8125a4e17cebd2432c4a.patch patch -g 0 -f -p1 -i /tmp/php-uuid--patch-20231204-16625-ygb5lp/a393861918b75d9657cb8125a4e17cebd2432c4a.patch patching file config.m4 patching file tests/uuid_mac.phpt patching file tests/uuid_time.phpt patching file uuid.c Hunk #1 succeeded at 348 (offset 31 lines). Hunk #2 succeeded at 378 (offset 31 lines). Hunk #3 succeeded at 412 (offset 31 lines). patching file uuid.stub.php Hunk #1 succeeded at 29 (offset -102 lines). patching file uuid_arginfo.h Hunk #1 FAILED at 1. Hunk #5 FAILED at 110. 2 out of 5 hunks FAILED -- saving rejects to file uuid_arginfo.h.rej patching file uuid_legacy_arginfo.h Hunk #1 FAILED at 1. Hunk #5 FAILED at 108. 2 out of 5 hunks FAILED -- saving rejects to file uuid_legacy_arginfo.h.rej ==> Formula Tap: smillerdev/tap Path: /home/linuxbrew/.linuxbrew/Homebrew/Library/Taps/smillerdev/homebrew-tap/Formula/php-uuid.rb ==> Configuration HOMEBREW_VERSION: 4.1.22-71-g8fbe927 ORIGIN: https://github.com/Homebrew/brew HEAD: 8fbe92754a43918d85250aed6aba6e043747b159 Last commit: 14 hours ago Core tap JSON: 04 Dec 16:16 UTC HOMEBREW_PREFIX: /home/linuxbrew/.linuxbrew HOMEBREW_BOOTSNAP: set HOMEBREW_CACHE: /home/runner/.cache/Homebrew HOMEBREW_CASK_OPTS: [] HOMEBREW_CLEANUP_PERIODIC_FULL_DAYS: 3650 HOMEBREW_COLOR: set HOMEBREW_CURL_PATH: /usr/bin/curl HOMEBREW_FAIL_LOG_LINES: 150 HOMEBREW_GIT_EMAIL: [email protected] HOMEBREW_GIT_NAME: BrewTestBot HOMEBREW_GIT_PATH: /usr/bin/git HOMEBREW_LOGS: /home/runner/work/homebrew-tap/homebrew-tap/logs HOMEBREW_MAKE_JOBS: 4 HOMEBREW_NO_AUTO_UPDATE: set HOMEBREW_NO_EMOJI: set HOMEBREW_NO_ENV_HINTS: set HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK: set HOMEBREW_SORBET_RUNTIME: set Homebrew Ruby: 3.1.4 => /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/vendor/portable-ruby/3.1.4/bin/ruby CPU: quad-core 64-bit zen3 Clang: 14.0.0 Git: 2.43.0 => /usr/bin/git Curl: 7.81.0 => /usr/bin/curl Kernel: Linux 6.2.0-1016-azure x86_64 GNU/Linux OS: Ubuntu 22.04.3 LTS (jammy) Host glibc: 2.35 /usr/bin/gcc: 11.4.0 /usr/bin/ruby: 3.0.2 glibc: N/A gcc@11: N/A gcc: N/A xorg: N/A ==> ENV HOMEBREW_CC: gcc-11 HOMEBREW_CXX: g++-11 MAKEFLAGS: -j4 CMAKE_PREFIX_PATH: /home/linuxbrew/.linuxbrew/opt/libpq:/home/linuxbrew/.linuxbrew PKG_CONFIG_PATH: /home/linuxbrew/.linuxbrew/opt/ncurses/lib/pkgconfig:/home/linuxbrew/.linuxbrew/opt/readline/lib/pkgconfig:/home/linuxbrew/.linuxbrew/opt/libxcrypt/lib/pkgconfig:/home/linuxbrew/.linuxbrew/opt/zlib/lib/pkgconfig:/home/linuxbrew/.linuxbrew/opt/util-linux/lib/pkgconfig:/home/linu

Check warning on line 28 in Formula/php-uuid.rb

View workflow job for this annotation

GitHub Actions / test-bot (macos-13)

`brew install --verbose --build-bottle smillerdev/tap/php-uuid` failed on macOS Ventura (13)!

==> Fetching smillerdev/tap/php-uuid ==> Downloading https://github.com/php/pecl-networking-uuid/commit/a393861918b75d9657cb8125a4e17cebd2432c4a.patch?full_index=1 Already downloaded: /Users/runner/Library/Caches/Homebrew/downloads/c687883256ed14555a8bd9e8feda8b303a823c3113979d0a139b03f0f473adb4--a393861918b75d9657cb8125a4e17cebd2432c4a.patch ==> Verifying checksum for 'c687883256ed14555a8bd9e8feda8b303a823c3113979d0a139b03f0f473adb4--a393861918b75d9657cb8125a4e17cebd2432c4a.patch' ==> Downloading https://pecl.php.net/get/uuid-1.2.0.tgz Already downloaded: /Users/runner/Library/Caches/Homebrew/downloads/213e801733b5c637fbfad788ea9017c87246cbf4dfc8fa312f5def44fadd55fd--uuid-1.2.0.tgz ==> Verifying checksum for '213e801733b5c637fbfad788ea9017c87246cbf4dfc8fa312f5def44fadd55fd--uuid-1.2.0.tgz' ==> Installing php-uuid from smillerdev/tap /usr/bin/env tar --extract --no-same-owner --file /Users/runner/Library/Caches/Homebrew/downloads/213e801733b5c637fbfad788ea9017c87246cbf4dfc8fa312f5def44fadd55fd--uuid-1.2.0.tgz --directory /private/tmp/d20231204-11039-1nlgjl /usr/bin/env cp -pR /private/tmp/d20231204-11039-1nlgjl/package.xml /private/tmp/php-uuid-20231204-11039-7y1t3s/package.xml /usr/bin/env cp -pR /private/tmp/d20231204-11039-1nlgjl/uuid-1.2.0/. /private/tmp/php-uuid-20231204-11039-7y1t3s/uuid-1.2.0 ==> Patching cp -p /Users/runner/Library/Caches/Homebrew/downloads/c687883256ed14555a8bd9e8feda8b303a823c3113979d0a139b03f0f473adb4--a393861918b75d9657cb8125a4e17cebd2432c4a.patch /private/tmp/php-uuid--patch-20231204-11039-unz2nw/a393861918b75d9657cb8125a4e17cebd2432c4a.patch ==> Applying a393861918b75d9657cb8125a4e17cebd2432c4a.patch patch -g 0 -f -p1 -i /private/tmp/php-uuid--patch-20231204-11039-unz2nw/a393861918b75d9657cb8125a4e17cebd2432c4a.patch patching file config.m4 patching file 'tests/uuid_mac.phpt' patching file 'tests/uuid_time.phpt' patching file uuid.c patching file uuid.stub.php No such line 130 in input file, ignoring patching file uuid_arginfo.h No such line 103 in input file, ignoring 2 out of 5 hunks failed--saving rejects to uuid_arginfo.h.rej patching file uuid_legacy_arginfo.h No such line 99 in input file, ignoring 2 out of 5 hunks failed--saving rejects to uuid_legacy_arginfo.h.rej ==> Formula Tap: smillerdev/tap Path: /usr/local/Homebrew/Library/Taps/smillerdev/homebrew-tap/Formula/php-uuid.rb ==> Configuration HOMEBREW_VERSION: 4.1.22-71-g8fbe927 ORIGIN: https://github.com/Homebrew/brew HEAD: 8fbe92754a43918d85250aed6aba6e043747b159 Last commit: 14 hours ago Core tap origin: https://github.com/Homebrew/homebrew-core Core tap HEAD: 67784bf7ffcffc775299bae0253121a7d9e2ee9d Core tap last commit: 6 weeks ago Core tap branch: master Core tap JSON: 04 Dec 16:16 UTC HOMEBREW_PREFIX: /usr/local HOMEBREW_BOOTSNAP: set HOMEBREW_CACHE: /Users/runner/Library/Caches/Homebrew HOMEBREW_CASK_OPTS: ["--no-quarantine"] HOMEBREW_COLOR: set HOMEBREW_CURL_PATH: /usr/bin/curl HOMEBREW_FAIL_LOG_LINES: 150 HOMEBREW_GIT_EMAIL: [email protected] HOMEBREW_GIT_NAME: BrewTestBot HOMEBREW_GIT_PATH: /usr/bin/git HOMEBREW_LOGS: /Users/runner/work/homebrew-tap/homebrew-tap/logs HOMEBREW_MAKE_JOBS: 4 HOMEBREW_NO_AUTO_UPDATE: set HOMEBREW_NO_EMOJI: set HOMEBREW_NO_ENV_HINTS: set HOMEBREW_NO_INSTALL_CLEANUP: set HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK: set HOMEBREW_SORBET_RUNTIME: set Homebrew Ruby: 3.1.4 => /usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/3.1.4/bin/ruby CPU: quad-core 64-bit ivybridge Clang: 14.0.3 build 1403 Git: 2.39.2 => /usr/bin/git Curl: 8.1.2 => /usr/bin/curl macOS: 13.6-x86_64 CLT: 15.0.0.0.1.1694021235 Xcode: 14.3.1 => /Applications/Xcode_14.3.1.app/Contents/Developer ==> ENV HOMEBREW_CC: clang HOMEBREW_CXX: clang++ MAKEFLAGS: -j4 CMAKE_PREFIX_PATH: /usr/local/opt/apr:/usr/local/opt/apr-util:/usr/local/opt/m4:/usr/local/opt/openldap:/usr/local/opt/curl:/usr/local/opt/icu4c:/usr/local/opt/krb5:/usr/local/opt/libpq:/usr/local/opt/readline:/usr/local/opt/sqlite:/usr/local/opt/util-linux:/usr/local CMAKE_INCLUDE_PATH: /Library/Developer/CommandLineTools/SDKs
chdir "uuid-#{version}" do
system Formula["php"].bin/"phpize"
configure_args = %W[
--with-php-config=#{Formula["php"].opt_bin/"php-config"}
--with-uuid=#{Formula["ossp-uuid"].opt_include}
]
system "./configure", *configure_args
system "make"
(lib/module_path).install "modules/uuid.so"
end
chdir "uuid-#{version}" if build.stable?
system Formula["php"].bin/"phpize"
configure_args = %W[
--with-php-config=#{Formula["php"].opt_bin/"php-config"}
--with-uuid=#{Formula["util-linux"].opt_prefix}
]
system "./configure", *configure_args
system "make"
(lib/module_path).install "modules/uuid.so"
end

def post_install
Expand Down
Loading