From owner-svn-ports-all@FreeBSD.ORG Sat Mar 15 20:21:50 2014 Return-Path: Delivered-To: svn-ports-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 93045232; Sat, 15 Mar 2014 20:21:50 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 7EB2811F; Sat, 15 Mar 2014 20:21:50 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2FKLoGY063838; Sat, 15 Mar 2014 20:21:50 GMT (envelope-from marino@svn.freebsd.org) Received: (from marino@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2FKLohQ063836; Sat, 15 Mar 2014 20:21:50 GMT (envelope-from marino@svn.freebsd.org) Message-Id: <201403152021.s2FKLohQ063836@svn.freebsd.org> From: John Marino Date: Sat, 15 Mar 2014 20:21:50 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r348377 - in head/devel/matreshka: . files X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Mar 2014 20:21:50 -0000 Author: marino Date: Sat Mar 15 20:21:49 2014 New Revision: 348377 URL: http://svnweb.freebsd.org/changeset/ports/348377 QAT: https://qat.redports.org/buildarchive/r348377/ Log: devel/matreshka: Add FireBird SQL Support After reporting the build issue of the Firebird SQL driver to the author, a fix was introduced a couple of days later. I finally have time to apply that repository fix. While here, fix it so the license can be installed. Added: head/devel/matreshka/files/patch-changeset_4465.diff (contents, props changed) Modified: head/devel/matreshka/Makefile Modified: head/devel/matreshka/Makefile ============================================================================== --- head/devel/matreshka/Makefile Sat Mar 15 20:20:58 2014 (r348376) +++ head/devel/matreshka/Makefile Sat Mar 15 20:21:49 2014 (r348377) @@ -3,7 +3,7 @@ PORTNAME= matreshka PORTVERSION= 0.6.0 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= devel MASTER_SITES= http://forge.ada-ru.org/matreshka/downloads/ @@ -21,11 +21,6 @@ NO_MTREE= yes OPTIONS_DEFINE= SQLITE3 FIREBIRD PGSQL MYSQL ORACLE AMF OPTIONS_DEFAULT=SQLITE3 FIREBIRD PGSQL MYSQL -#FIREBIRD option requires Ada-2012; disable until new compiler arrives -#Excluding option breaks X_CONFIGURE_ENABLE, so manually set that too -OPTIONS_EXCLUDE=FIREBIRD -CONFIGURE_ARGS+= --disable-firebird - AMF_DESC= Build Ada Modeling Framework SQLITE3_CONFIGURE_ENABLE= sqlite3 @@ -36,7 +31,6 @@ ORACLE_CONFIGURE_ENABLE= oracle AMF_CONFIGURE_ENABLE= amf MAKE_JOBS_UNSAFE= yes -NO_LICENSES_INSTALL= yes MAKE_ENV+= SMP_MFLAGS=-j${MAKE_JOBS_NUMBER} @@ -60,11 +54,11 @@ USE_SQLITE= yes .endif pre-configure: - cd ${WRKSRC} && ${SETENV} ${CONFIGURE_ENV} ${GMAKE} config + cd ${WRKSRC} && ${SETENV} ${CONFIGURE_ENV} ${MAKE_CMD} config post-install: @cd ${STAGEDIR}${PREFIX}; ${FIND} * \( -type f -or -type l \) | \ - ${SORT} > ${TMPPLIST} + ${SORT} >> ${TMPPLIST} @cd ${STAGEDIR}${PREFIX}; ${FIND} * -type d | ${AWK} '/\//' | ${SORT} -r | \ ${SED} -e '/lib\/gnat$$/d' -e 's/^/@dirrm /g' >> ${TMPPLIST} @echo "@unexec rmdir %D/lib/gnat 2>/dev/null || true" >> ${TMPPLIST} Added: head/devel/matreshka/files/patch-changeset_4465.diff ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/devel/matreshka/files/patch-changeset_4465.diff Sat Mar 15 20:21:49 2014 (r348377) @@ -0,0 +1,203 @@ +Restore FireBird SQL Support +http://forge.ada-ru.org/matreshka/changeset/4465 + +=================================================================== +--- source/sql/firebird/matreshka-internals-sql_drivers-firebird-databases.adb.orig ++++ source/sql/firebird/matreshka-internals-sql_drivers-firebird-databases.adb +@@ -213,20 +213,25 @@ + + overriding function Open + (Self : not null access Firebird_Database; +- Options : League.Strings.Universal_String) return Boolean ++ Options : SQL.Options.SQL_Options) return Boolean + is + use type Isc_Result_Code; + use League.Strings; + + Result : Isc_Result_Code := 0; ++ ++ Database_Name : constant League.Strings.Universal_String ++ := League.Strings.To_Universal_String ("database"); ++ Password_Name : constant League.Strings.Universal_String ++ := League.Strings.To_Universal_String ("password"); ++ User_Name : constant League.Strings.Universal_String ++ := League.Strings.To_Universal_String ("user"); + + function Get_User return League.Strings.Universal_String; + function Get_Password return League.Strings.Universal_String; + function Get_Database return Isc_String; + procedure Create_Codec; + +- Pwd_Separator : constant Natural := Options.Index ('/'); +- DB_Separator : constant Natural := Options.Index ('@'); + Charset : constant League.Strings.Universal_String := + League.Strings.To_Universal_String ("UTF8"); + +@@ -304,22 +309,9 @@ + Empty : constant Isc_String (1 .. 0) := (others => Interfaces.C.nul); + + begin +- if DB_Separator /= 0 then +- declare +- V_Item : constant Ada.Streams.Stream_Element_Array := +- ASCII_Codec.Encode +- (Options.Slice (DB_Separator + 1, Options.Length)). +- To_Stream_Element_Array; +- +- S_Item : String (1 .. V_Item'Length); +- +- for S_Item'Address use V_Item'Address; +- pragma Import (Ada, S_Item); +- +- begin +- return Interfaces.C.To_C (S_Item); +- end; +- ++ if Options.Is_Set (Database_Name) then ++ return Interfaces.C.To_C ++ (Options.Get (Database_Name).To_UTF_8_String); + else + return Empty; + end if; +@@ -331,14 +323,8 @@ + + function Get_Password return League.Strings.Universal_String is + begin +- if Pwd_Separator /= 0 then +- if DB_Separator /= 0 then +- return Options.Slice (Pwd_Separator + 1, DB_Separator - 1); +- +- else +- return Options.Slice (Pwd_Separator + 1, Options.Length); +- end if; +- ++ if Options.Is_Set (Password_Name) then ++ return Options.Get (Password_Name); + else + return League.Strings.Empty_Universal_String; + end if; +@@ -350,14 +336,10 @@ + + function Get_User return League.Strings.Universal_String is + begin +- if Pwd_Separator /= 0 then +- return Options.Slice (1, Pwd_Separator - 1); +- +- elsif DB_Separator /= 0 then +- return Options.Slice (1, DB_Separator - 1); +- ++ if Options.Is_Set (User_Name) then ++ return Options.Get (User_Name); + else +- return Options; ++ return League.Strings.Empty_Universal_String; + end if; + end Get_User; + +--- source/sql/firebird/matreshka-internals-sql_drivers-firebird-databases.ads.orig ++++ source/sql/firebird/matreshka-internals-sql_drivers-firebird-databases.ads +@@ -106,7 +106,7 @@ + + overriding function Open + (Self : not null access Firebird_Database; +- Options : League.Strings.Universal_String) return Boolean; ++ Options : SQL.Options.SQL_Options) return Boolean; + + procedure Check_Result + (Self : not null access Firebird_Database; +--- source/sql/firebird/matreshka-internals-sql_drivers-firebird-queries.adb.orig ++++ source/sql/firebird/matreshka-internals-sql_drivers-firebird-queries.adb +@@ -169,6 +169,7 @@ + end if; + end case; + ++ Self.Is_Valid := False; + return True; + + exception +@@ -294,6 +295,7 @@ + Self.Sql_Params.Codec := Codec; + Self.Sql_Record.Utf := Utf; + Self.Sql_Params.Utf := Utf; ++ Self.Is_Valid := False; + + SQL_Drivers.Initialize (Self, Database_Access (Database)); + end Initialize; +@@ -327,6 +329,16 @@ + begin + return Self.State = Active; + end Is_Active; ++ ++ -------------- ++ -- Is_Valid -- ++ -------------- ++ ++ overriding function Is_Valid ++ (Self : not null access Firebird_Query) return Boolean is ++ begin ++ return Self.Is_Valid; ++ end Is_Valid; + + ---------- + -- Next -- +@@ -349,6 +361,7 @@ + + if Result > 0 then + if Result = 100 then ++ Self.Is_Valid := False; + return False; + + else +@@ -358,11 +371,13 @@ + + begin + if Check_For_Error (Self.Status'Access, EC) then ++ Self.Is_Valid := False; + return False; + + else + Self.Error := Get_Error (Self.Status'Access); + Self.Finish; ++ Self.Is_Valid := False; + + return False; + end if; +@@ -370,6 +385,7 @@ + end if; + + else ++ Self.Is_Valid := True; + return True; + end if; + end Next; +--- source/sql/firebird/matreshka-internals-sql_drivers-firebird-queries.ads.orig ++++ source/sql/firebird/matreshka-internals-sql_drivers-firebird-queries.ads +@@ -81,6 +81,7 @@ + Cursor_Name : Isc_String (1 .. 10); + Status : aliased Isc_Results := (others => 0); + Error : League.Strings.Universal_String; ++ Is_Valid : Boolean := False; + end record; + + overriding procedure Bind_Value +@@ -110,6 +111,9 @@ + overriding function Next + (Self : not null access Firebird_Query) return Boolean; + ++ overriding function Is_Valid ++ (Self : not null access Firebird_Query) return Boolean; ++ + overriding function Prepare + (Self : not null access Firebird_Query; + Query : League.Strings.Universal_String) return Boolean; +--- source/sql/matreshka-internals-sql_drivers.ads.orig ++++ source/sql/matreshka-internals-sql_drivers.ads +@@ -154,7 +154,7 @@ + (Self : not null access Abstract_Query'Class) return Boolean; + -- Returns True when query object is valid. + +- function Is_Valid ++ not overriding function Is_Valid + (Self : not null access Abstract_Query) return Boolean is abstract; + -- Returns True if the query is currently positioned on a valid record; + -- otherwise returns false.