Skip to content

Commit

Permalink
Merge pull request #16 from tfcollins/fix-gtk-upgrade
Browse files Browse the repository at this point in the history
Fix gtk upgrade
  • Loading branch information
tfcollins authored Feb 22, 2022
2 parents bd89988 + 7288990 commit 6e70e9f
Show file tree
Hide file tree
Showing 4 changed files with 105 additions and 5 deletions.
9 changes: 7 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@ jobs:
install:

strategy:
fail-fast: false
matrix:
os: [ macos-10.15 ]
os: [ macos-10.15, macos-11.0 ]
package: [ libiio, libad9361-iio, gr-iio, iio-oscilloscope ]

runs-on: ${{ matrix.os }}
Expand All @@ -18,7 +19,11 @@ jobs:
run: cp *.rb $(brew --prefix)/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/
- name: Install
run: |
[ "${{ matrix.package }}" = "gr-iio" ] && OPTIONS="--HEAD"
[ "${{ matrix.package }}" == "gr-iio" ] && OPTIONS="--HEAD"
[ "${{ matrix.package }}" != "libiio" ] && brew install --verbose --build-from-source libiio
[ "${{ matrix.package }}" == "iio-oscilloscope" ] && brew install --verbose --build-from-source libad9361-iio
[ "${{ matrix.package }}" == "iio-oscilloscope" ] && brew install --verbose --build-from-source gtkdatabox-prev1
[ "${{ matrix.package }}" == "gr-iio" ] && brew install --verbose --build-from-source libad9361-iio
brew install --verbose --build-from-source $OPTIONS ${{ matrix.package }}
- name: Test
run: brew test ${{ matrix.package }}
94 changes: 94 additions & 0 deletions gtkdatabox-prev1.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
# typed: false
# frozen_string_literal: true

class GtkdataboxPrev1 < Formula
desc "Widget for live display of large amounts of changing data"
homepage "https://sourceforge.net/projects/gtkdatabox/"
url "https://downloads.sourceforge.net/project/gtkdatabox/gtkdatabox/0.9.3.1/gtkdatabox-0.9.3.1.tar.gz"
sha256 "d04938d969d5458bd0df1b4fa22f647fb2eeeef75555a71f967e6c039fb4bde5"
license "LGPL-2.1"
revision 1

livecheck do
url :stable
end

bottle do
sha256 cellar: :any, arm64_big_sur: "6159b963d83a085b13210a728e559a4f9fdb1a54f6887ed198792772d0c9c222"
sha256 cellar: :any, big_sur: "0653f694493bb5cda05df1dde2b340014e5c51e46d7f0c9351092cbc9c9d45fa"
sha256 cellar: :any, catalina: "5bbfa821a847ebaad507380489df974dd82fd7ed99fef8966cd8e27549671fe4"
sha256 cellar: :any, mojave: "af155aeb3a3df37027681ffb4873d0ab87263a34e1268d8b87e45f76c6824750"
end

depends_on "pkg-config" => :build
depends_on "gtk+"

def install
system "./configure", "--disable-dependency-tracking",
"--prefix=#{prefix}"
system "make", "install"
end

test do
(testpath/"test.c").write <<~EOS
#include <gtkdatabox.h>
int main(int argc, char *argv[]) {
GtkWidget *db = gtk_databox_new();
return 0;
}
EOS
atk = Formula["atk"]
cairo = Formula["cairo"]
fontconfig = Formula["fontconfig"]
freetype = Formula["freetype"]
gdk_pixbuf = Formula["gdk-pixbuf"]
gettext = Formula["gettext"]
glib = Formula["glib"]
gtkx = Formula["gtk+"]
harfbuzz = Formula["harfbuzz"]
libpng = Formula["libpng"]
pango = Formula["pango"]
pixman = Formula["pixman"]
flags = %W[
-I#{atk.opt_include}/atk-1.0
-I#{cairo.opt_include}/cairo
-I#{fontconfig.opt_include}
-I#{freetype.opt_include}/freetype2
-I#{gdk_pixbuf.opt_include}/gdk-pixbuf-2.0
-I#{gettext.opt_include}
-I#{glib.opt_include}/glib-2.0
-I#{glib.opt_lib}/glib-2.0/include
-I#{gtkx.opt_include}/gtk-2.0
-I#{gtkx.opt_lib}/gtk-2.0/include
-I#{harfbuzz.opt_include}/harfbuzz
-I#{include}
-I#{libpng.opt_include}/libpng16
-I#{pango.opt_include}/pango-1.0
-I#{pixman.opt_include}/pixman-1
-D_REENTRANT
-L#{atk.opt_lib}
-L#{cairo.opt_lib}
-L#{gdk_pixbuf.opt_lib}
-L#{gettext.opt_lib}
-L#{glib.opt_lib}
-L#{gtkx.opt_lib}
-L#{lib}
-L#{pango.opt_lib}
-latk-1.0
-lcairo
-lgdk-quartz-2.0
-lgdk_pixbuf-2.0
-lgio-2.0
-lglib-2.0
-lgobject-2.0
-lgtk-quartz-2.0
-lgtkdatabox
-lintl
-lpango-1.0
-lpangocairo-1.0
]
system ENV.cc, "test.c", "-o", "test", *flags
system "./test"
end
end
3 changes: 2 additions & 1 deletion iio-oscilloscope.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,11 @@ class IioOscilloscope < Formula
depends_on "gettext"
depends_on "glib"
depends_on "gtk+"
depends_on "gtkdatabox"
depends_on "gtkdatabox-prev1"
depends_on "harfbuzz"
depends_on "jansson"
depends_on "libad9361-iio"
depends_on "libglade"
depends_on "libiio"
depends_on "libmatio"
depends_on "libserialport"
Expand Down
4 changes: 2 additions & 2 deletions libiio.rb
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
class Libiio < Formula
desc "Library for interfacing with local and remote Linux IIO devices"
homepage "https://analogdevicesinc.github.io/libiio/"
url "https://github.com/analogdevicesinc/libiio/archive/v0.21.tar.gz"
sha256 "03d13165cbeb83b036743cbd9a10e336c728da162714f39d13250a3d94305cac"
url "https://github.com/analogdevicesinc/libiio/archive/v0.23.tar.gz"
sha256 "df1577740ea93dca732e7d7c04786600cb083117901dee793f3d38980754af00"
license "LGPL-2.1"
head "https://github.com/analogdevicesinc/libiio.git"

Expand Down

0 comments on commit 6e70e9f

Please sign in to comment.