<commit_before>require 'formula'

class Gptfdisk < Formula
  homepage 'http://www.rodsbooks.com/gdisk/'
  url 'http://sourceforge.net/projects/gptfdisk/files/gptfdisk/0.8.5/gptfdisk-0.8.5.tar.gz'
  sha1 'fdff85df2515d5c11d5dc6fdf726a0d65f5136d4'

  depends_on 'popt'
  depends_on 'icu4c'

  def patches; DATA; end

  def install
    system "make -f Makefile.mac"
    sbin.install ['gdisk','cgdisk','sgdisk','fixparts']
    man8.install ['gdisk.8','cgdisk.8','sgdisk.8','fixparts.8']
  end

  def test
    system "echo | #{sbin}/gdisk"
  end
end
__END__
diff -u a/Makefile.mac b/Makefile.mac
--- a/Makefile.mac	2012-01-22 20:44:28.000000000 +0100
+++ b/Makefile.mac	2012-02-21 01:00:34.000000000 +0100
@@ -1,11 +1,7 @@
-CC=gcc
-CXX=g++
 CFLAGS=-O2 -D_FILE_OFFSET_BITS=64 -g
-CXXFLAGS=-O2 -Wall -D_FILE_OFFSET_BITS=64 -D USE_UTF16 -I/sw/include -I/usr/local/include -I/opt/local/include -g
-#CXXFLAGS=-O2 -Wall -D_FILE_OFFSET_BITS=64 -I /usr/local/include -I/opt/local/include -g
+CXXFLAGS+=-O2 -Wall -D_FILE_OFFSET_BITS=64 -D USE_UTF16 -g
 LIB_NAMES=crc32 support guid gptpart mbrpart basicmbr mbr gpt bsd parttypes attributes diskio diskio-unix
 MBR_LIBS=support diskio diskio-unix basicmbr mbrpart
-#LIB_SRCS=$(NAMES:=.cc)
 LIB_OBJS=$(LIB_NAMES:=.o)
 MBR_LIB_OBJS=$(MBR_LIBS:=.o)
 LIB_HEADERS=$(LIB_NAMES:=.h)
@@ -14,17 +10,14 @@
 all:	gdisk sgdisk cgdisk fixparts

 gdisk:	$(LIB_OBJS) gpttext.o gdisk.o
-#	$(CXX) $(LIB_OBJS) gpttext.o gdisk.o -o gdisk
-	$(CXX) $(LIB_OBJS) -L/usr/lib -licucore gpttext.o gdisk.o -o gdisk
+	$(CXX) $(LIB_OBJS) $(LDFLAGS) -licuuc -licuio gpttext.o gdisk.o -o gdisk

 cgdisk: $(LIB_OBJS) cgdisk.o gptcurses.o
-#	$(CXX) $(LIB_OBJS) cgdisk.o gptcurses.o $(LDFLAGS) -lncurses -o sgdisk
-	$(CXX) $(LIB_OBJS) cgdisk.o gptcurses.o $(LDFLAGS) -licucore -lncurses -o cgdisk
+	$(CXX) $(LIB_OBJS) cgdisk.o gptcurses.o $(LDFLAGS) -licuuc -licuio -lncurses -o cgdisk

 sgdisk: $(LIB_OBJS) gptcl.o sgdisk.o
-#	$(CXX) $(LIB_OBJS) gptcl.o sgdisk.o -L/sw/lib -lpopt -o sgdisk
-	$(CXX) $(LIB_OBJS) gptcl.o sgdisk.o -L/sw/lib -licucore -lpopt -o sgdisk
-
+	$(CXX) $(LIB_OBJS) gptcl.o sgdisk.o $(LDFLAGS) -licuuc -licuio -lpopt -o sgdisk
+
 fixparts: $(MBR_LIB_OBJS) fixparts.o
	$(CXX) $(MBR_LIB_OBJS) fixparts.o $(LDFLAGS) -o fixparts<commit_msg>gptfdisk 0.8.6<commit_after>require 'formula'

class Gptfdisk < Formula
  homepage 'http://www.rodsbooks.com/gdisk/'
  url 'http://sourceforge.net/projects/gptfdisk/files/gptfdisk/0.8.6/gptfdisk-0.8.6.tar.gz'
  sha1 '87dc5704b19173c7536c7fa991912a81e69c5020'

  depends_on 'popt'
  depends_on 'icu4c'

  def install
    system "make -f Makefile.mac"
    sbin.install ['gdisk','cgdisk','sgdisk','fixparts']
    man8.install ['gdisk.8','cgdisk.8','sgdisk.8','fixparts.8']
  end

  def test
    system "echo | #{sbin}/gdisk"
  end
end
{'fraction_non_alphanumeric': 0.16875671802221426, 'fraction_numerical': 0.059476890003582944, 'mean_word_length': 4.057971014492754, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 2, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '68622', 'n_tokens_mistral': 1389, 'n_tokens_neox': 1269, 'n_words': 239}