2010-02-04 18:10:25 +00:00
|
|
|
require 'formula'
|
|
|
|
|
2011-03-10 05:11:03 +00:00
|
|
|
class Fltk < Formula
|
2010-02-04 18:10:25 +00:00
|
|
|
homepage 'http://www.fltk.org/'
|
2013-04-23 22:15:08 +00:00
|
|
|
url 'http://fossies.org/linux/misc/fltk-1.3.2-source.tar.gz'
|
2013-01-18 19:58:15 +00:00
|
|
|
sha1 '25071d6bb81cc136a449825bfd574094b48f07fb'
|
2014-03-23 02:51:41 +00:00
|
|
|
revision 1
|
2010-04-07 05:58:35 +00:00
|
|
|
|
2013-05-13 13:37:58 +00:00
|
|
|
option :universal
|
|
|
|
|
2014-03-23 02:51:41 +00:00
|
|
|
depends_on 'libpng'
|
2011-08-29 19:06:21 +00:00
|
|
|
depends_on 'jpeg'
|
|
|
|
|
2012-04-11 19:37:18 +00:00
|
|
|
fails_with :clang do
|
|
|
|
build 318
|
|
|
|
cause "http://llvm.org/bugs/show_bug.cgi?id=10338"
|
|
|
|
end
|
|
|
|
|
2014-03-14 01:07:46 +00:00
|
|
|
# First patch is to fix issue with -lpng not found.
|
2013-05-19 16:39:46 +00:00
|
|
|
# Based on: https://trac.macports.org/browser/trunk/dports/aqua/fltk/files/patch-src-Makefile.diff
|
2014-03-14 01:07:46 +00:00
|
|
|
#
|
|
|
|
# Second patch is to fix compile issue with clang 3.4.
|
|
|
|
# Based on: http://www.fltk.org/strfiles/3046/fltk-clang3.4-1.patch
|
2014-03-18 21:51:42 +00:00
|
|
|
patch :DATA
|
2013-05-19 16:39:46 +00:00
|
|
|
|
2010-02-04 18:10:25 +00:00
|
|
|
def install
|
2013-05-13 13:37:58 +00:00
|
|
|
ENV.universal_binary if build.universal?
|
|
|
|
system "./configure", "--prefix=#{prefix}",
|
|
|
|
"--enable-threads",
|
|
|
|
"--enable-shared"
|
2010-02-04 18:10:25 +00:00
|
|
|
system "make install"
|
|
|
|
end
|
|
|
|
end
|
2013-05-19 16:39:46 +00:00
|
|
|
|
|
|
|
__END__
|
|
|
|
diff --git a/src/Makefile b/src/Makefile
|
|
|
|
index fcad5f0..5a5a850 100644
|
|
|
|
--- a/src/Makefile
|
|
|
|
+++ b/src/Makefile
|
|
|
|
@@ -355,7 +355,7 @@ libfltk_images.1.3.dylib: $(IMGOBJECTS) libfltk.1.3.dylib
|
|
|
|
-install_name $(libdir)/$@ \
|
|
|
|
-current_version 1.3.1 \
|
|
|
|
-compatibility_version 1.3.0 \
|
|
|
|
- $(IMGOBJECTS) -L. $(LDLIBS) $(IMAGELIBS) -lfltk
|
|
|
|
+ $(IMGOBJECTS) -L. $(LDLIBS) $(IMAGELIBS) -lfltk $(LDFLAGS)
|
|
|
|
$(RM) libfltk_images.dylib
|
|
|
|
$(LN) libfltk_images.1.3.dylib libfltk_images.dylib
|
|
|
|
|
2014-03-14 01:07:46 +00:00
|
|
|
diff --git a/fluid/Fl_Type.h b/fluid/Fl_Type.h
|
|
|
|
index fdbe320..bd7e741 100644
|
|
|
|
--- a/fluid/Fl_Type.h
|
|
|
|
+++ b/fluid/Fl_Type.h
|
|
|
|
@@ -36,7 +36,7 @@ void set_modflag(int mf);
|
|
|
|
class Fl_Type {
|
|
|
|
|
|
|
|
friend class Widget_Browser;
|
|
|
|
- friend Fl_Widget *make_type_browser(int,int,int,int,const char *l=0);
|
|
|
|
+ friend Fl_Widget *make_type_browser(int,int,int,int,const char *);
|
|
|
|
friend class Fl_Window_Type;
|
|
|
|
virtual void setlabel(const char *); // virtual part of label(char*)
|