diff -x .DS_Store -x work -x src -ruN /opt/local/var/macports/sources/rsync.macports.org/release/ports/graphics/lprof/Portfile ./Portfile --- /opt/local/var/macports/sources/rsync.macports.org/release/ports/graphics/lprof/Portfile 2009-12-31 22:36:31.000000000 +0100 +++ ./Portfile 2010-01-19 21:32:22.000000000 +0100 @@ -4,8 +4,8 @@ PortSystem 1.0 name lprof -version 20090113 -revision 2 +version 20100119 +revision 4 categories graphics license GPL maintainers nomaintainer @@ -23,6 +23,8 @@ cvs.root :pserver:anonymous@lprof.cvs.sourceforge.net:/cvsroot/lprof cvs.date ${version} cvs.module lprof +patchfiles results-sort-columns.patch +patchfiles argyll-nsbeep.patch depends_lib path:bin/qmake-mac:qt4-mac port:libusb-compat depends_build port:cmake @@ -61,8 +63,8 @@ file copy $worksrcpath/build/darwin/lprof.app/Contents/Resources/lprof.icns $appcdir/Resources file copy $worksrcpath/src/argyll/libusb/Argyll.kext/Info.plist $appcdir/Argyll.kext file copy $applications_dir/Qt/Assistant.app $appcdir/MacOS - eval file copy [glob "$destroot$prefix/data/*"] $appcdir/MacOS/data - file delete -force $destroot$prefix/bin $destroot$prefix/data + eval file copy [glob "$destroot$prefix/share/lprof/data/*"] $appcdir/MacOS/data + file delete -force $destroot$prefix/bin $destroot$prefix/share/lprof/data } livecheck.type none diff -x .DS_Store -x work -x src -ruN /opt/local/var/macports/sources/rsync.macports.org/release/ports/graphics/lprof/files/argyll-nsbeep.patch ./files/argyll-nsbeep.patch --- /opt/local/var/macports/sources/rsync.macports.org/release/ports/graphics/lprof/files/argyll-nsbeep.patch 1970-01-01 01:00:00.000000000 +0100 +++ ./files/argyll-nsbeep.patch 2010-01-19 20:59:00.000000000 +0100 @@ -0,0 +1,20 @@ +--- src/argyll/spectro/unixio.c 2008-02-19 22:02:24.000000000 +0100 ++++ src/argyll/spectro/unixio.c 2010-01-19 20:56:02.000000000 +0100 +@@ -288,7 +288,7 @@ static int beep_msec; + static int delayed_beep(void *pp) { + msec_sleep(beep_delay); + #ifdef __APPLE__ +- SysBeep((beep_msec * 60)/1000); ++ NSBeep(); + #else + fprintf(stdout, "\a"); fflush(stdout); + #endif +@@ -307,7 +307,7 @@ void msec_beep(int delay, int freq, int + error("Delayed beep failed to create thread"); + } else { + #ifdef __APPLE__ +- SysBeep((msec * 60)/1000); ++ NSBeep(); + #else + /* Linux is pretty lame in this regard... */ + fprintf(stdout, "\a"); fflush(stdout); diff -x .DS_Store -x work -x src -ruN /opt/local/var/macports/sources/rsync.macports.org/release/ports/graphics/lprof/files/results-sort-columns.patch ./files/results-sort-columns.patch --- /opt/local/var/macports/sources/rsync.macports.org/release/ports/graphics/lprof/files/results-sort-columns.patch 1970-01-01 01:00:00.000000000 +0100 +++ ./files/results-sort-columns.patch 2009-05-05 20:35:58.000000000 +0200 @@ -0,0 +1,118 @@ +--- src/libqtlcmswidgets/qtlcmswidgets.h.orig 2009-05-02 22:30:25.000000000 +0200 ++++ src/libqtlcmswidgets/qtlcmswidgets.h 2009-05-02 23:21:14.000000000 +0200 +@@ -336,7 +336,11 @@ + // -------------------------------------------------------------- Checks results + + +-class CheckProfile { ++class CheckProfile : public QObject { ++ Q_OBJECT ++ Q3Table *table; ++ int lastSortCol; ++ bool asc; + + public: + +@@ -356,6 +360,9 @@ + void CreateFancyReport(QString& Report, Statistics& st, Statistics& st94, + CheckerCorrection corr, double params[]); + ++private slots: ++ void sortByColumn(int col); ++ + public: + + CheckProfile(QComboBox *corrCombo = NULL); +--- src/libqtlcmswidgets/qtlcmswidgets.cpp.orig 2009-05-02 22:16:36.000000000 +0200 ++++ src/libqtlcmswidgets/qtlcmswidgets.cpp 2009-05-03 00:51:36.000000000 +0200 +@@ -1001,6 +1001,64 @@ + } + } + ++static int cmpTableItems(const void *n1, const void *n2) ++{ ++ Q3TableItem **i1 = (Q3TableItem **)n1; ++ Q3TableItem **i2 = (Q3TableItem **)n2; ++ int diff = (*i1)->key().localeAwareCompare((*i2)->key()); ++ if (diff == 0) ++ { ++ Q3TableItem *id1 = (*i1)->table()->item((*i1)->row(), 11); ++ Q3TableItem *id2 = (*i2)->table()->item((*i2)->row(), 11); ++ diff = id1->key().localeAwareCompare(id2->key()); ++ } ++ return diff; ++} ++ ++// Like Q3Table::sortColumn, except swaps the whole row, with the header, ++// and where the row values are identical, sorts by patch row rank. ++static void sortColumn(Q3Table *table, int col, bool ascending) ++{ ++ int i, rows = table->numRows(); ++ Q3TableItem **items = new Q3TableItem *[rows]; ++ for (int i = 0; i < rows; ++i) ++ { ++ items[i] = table->item(i, col); ++ } ++ ++ qsort(items, rows, sizeof(Q3TableItem *), cmpTableItems); ++ ++ table->setUpdatesEnabled(false); ++ table->verticalHeader()->setUpdatesEnabled(false); ++ for (i = 0; i < rows; ++i) ++ { ++ int newRow = (ascending ? i : rows - i - 1); ++ if (items[i]->row() != newRow) ++ table->swapRows(items[i]->row(), newRow, true); ++ } ++ table->verticalHeader()->setUpdatesEnabled(true); ++ table->setUpdatesEnabled(true); ++ table->horizontalHeader()->setSortIndicator(col, ascending ? Qt::Ascending : Qt::Descending); ++ table->verticalHeader()->update(); ++ table->update(); ++ delete [] items; ++} ++ ++void CheckProfile::sortByColumn(int col) ++{ ++ if (col == lastSortCol) ++ { ++ asc = !asc; ++ } ++ else ++ { ++ lastSortCol = col; ++ asc = false; ++ } ++ sortColumn(table, lastSortCol, asc); ++} ++ ++ + void CheckProfile::Results(Q3Table* ResultsGrid, + QString& ResultsText, + LPMEASUREMENT m, +@@ -1020,7 +1078,14 @@ + Vertical -> setResizeEnabled(FALSE); + + ResultsGrid -> setLeftMargin(60); +- ResultsGrid -> setNumCols(11); ++ ResultsGrid -> setNumCols(12); ++ ResultsGrid -> hideColumn(11); ++ ++ asc = false; ++ lastSortCol = -1; ++ table = ResultsGrid; ++ connect(ResultsGrid->horizontalHeader(), SIGNAL(sectionClicked(int)), ++ this, SLOT(sortByColumn(int))); + + Horizontal -> setLabel(0, QString::fromLocal8Bit("")); + Horizontal -> setLabel(1, QTranslator::tr("CIE La*b* dE")); +@@ -1244,6 +1309,9 @@ + Text.sprintf(" %2.2f ", dEBFL); + SetGridItem(ResultsGrid, i, 10, Text); + ++ Text.sprintf(" %04d", i); ++ SetGridItem(ResultsGrid, i, 11, Text); ++ + if (p ->dwFlags & PATCH_HAS_STD_DE) + { + st.EstimateTargetError(p -> dEStd);