Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(419)

Side by Side Diff: ports/pkg/nacl.patch

Issue 1285953002: Switch devenv to use pkg packages (Closed) Base URL: https://chromium.googlesource.com/external/naclports.git@toolchain_install
Patch Set: Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ports/perl/build.sh ('k') | ports/subversion/build.sh » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 diff --git a/compat/Makefile.am b/compat/Makefile.am 1 diff --git a/compat/Makefile.am b/compat/Makefile.am
2 --- a/compat/Makefile.am 2 --- a/compat/Makefile.am
3 +++ b/compat/Makefile.am 3 +++ b/compat/Makefile.am
4 @@ -1,8 +1,7 @@ 4 @@ -1,8 +1,7 @@
5 -noinst_LTLIBRARIES= libbsd_compat.la 5 -noinst_LTLIBRARIES= libbsd_compat.la
6 noinst_HEADERS= bsd_compat.h endian_util.h gr_util.h \ 6 noinst_HEADERS= bsd_compat.h endian_util.h gr_util.h \
7 humanize_number.h 7 humanize_number.h
8 8
9 -libbsd_compat_la_SOURCES= basename.c \ 9 -libbsd_compat_la_SOURCES= basename.c \
10 +sources= basename.c \ 10 +sources= basename.c \
(...skipping 719 matching lines...) Expand 10 before | Expand all | Expand 10 after
730 + return pkg_arch_to_legacy(current, dest, sz); 730 + return pkg_arch_to_legacy(current, dest, sz);
731 +} 731 +}
732 + 732 +
733 +int 733 +int
734 +pkg_get_myarch(char *dest, size_t sz) 734 +pkg_get_myarch(char *dest, size_t sz)
735 +{ 735 +{
736 + char * os_name = "nacl"; 736 + char * os_name = "nacl";
737 +#ifdef __arm__ 737 +#ifdef __arm__
738 + const char* cpu_name = "arm"; 738 + const char* cpu_name = "arm";
739 +#elif defined __i386__ 739 +#elif defined __i386__
740 +» const char* cpu_name = "i386"; 740 +» const char* cpu_name = "i686";
741 +#elif defined __x86_64__ 741 +#elif defined __x86_64__
742 + const char* cpu_name = "x86_64"; 742 + const char* cpu_name = "x86_64";
743 +#elif defined __pnacl__ 743 +#elif defined __pnacl__
744 + const char* cpu_name = "pnacl"; 744 + const char* cpu_name = "pnacl";
745 +#else 745 +#else
746 +#error "Unknown architecture" 746 +#error "Unknown architecture"
747 +#endif 747 +#endif
748 + long long major_version = 0; 748 + long long major_version = 0;
749 + char *spec = NULL; 749 + char *spec = NULL;
750 + int ret = EPKG_OK; 750 + int ret = EPKG_OK;
(...skipping 531 matching lines...) Expand 10 before | Expand all | Expand 10 after
1282 #include "private/db_upgrades.h" 1282 #include "private/db_upgrades.h"
1283 1283
1284 +#ifdef __native_client__ 1284 +#ifdef __native_client__
1285 +// Adapt the same fix as ruby 1285 +// Adapt the same fix as ruby
1286 +#define eaccess access 1286 +#define eaccess access
1287 +#endif 1287 +#endif
1288 + 1288 +
1289 /* An application using a libpkg() DBVERSION is assumed to be compatible 1289 /* An application using a libpkg() DBVERSION is assumed to be compatible
1290 with: 1290 with:
1291 1291
1292 @@ -675,8 +679,15 @@ pkgdb_is_insecure_mode(const char *path, bool install_as_us er) 1292 @@ -675,8 +680,15 @@ pkgdb_is_insecure_mode(const char *path, bool install_as_us er)
1293 struct stat sb; 1293 struct stat sb;
1294 1294
1295 if (install_as_user) { 1295 if (install_as_user) {
1296 + // No check for nacl 1296 + // No check for nacl
1297 + // Turn back on when geteuid and getegid are available 1297 + // Turn back on when geteuid and getegid are available
1298 +#ifdef __native_client_ 1298 +#ifdef __native_client_
1299 + fileowner = 0; 1299 + fileowner = 0;
1300 + filegroup = 0; 1300 + filegroup = 0;
1301 +#else 1301 +#else
1302 fileowner = geteuid(); 1302 fileowner = geteuid();
1303 filegroup = getegid(); 1303 filegroup = getegid();
1304 +#endif 1304 +#endif
1305 } else { 1305 } else {
1306 fileowner = 0; 1306 fileowner = 0;
1307 filegroup = 0; 1307 filegroup = 0;
1308 @@ -691,6 +702,8 @@ pkgdb_is_insecure_mode(const char *path, bool install_as_use r) 1308 @@ -691,6 +703,8 @@ pkgdb_is_insecure_mode(const char *path, bool install_as_use r)
1309 return (EPKG_FATAL); 1309 return (EPKG_FATAL);
1310 } 1310 }
1311 1311
1312 + // No check in devenv. Cannot change permission. Everything is 777. 1312 + // No check in devenv. Cannot change permission. Everything is 777.
1313 +#ifndef __native_client__ 1313 +#ifndef __native_client__
1314 /* if fileowner == 0, root ownership and no group or other 1314 /* if fileowner == 0, root ownership and no group or other
1315 read access. if fileowner != 0, require no other read 1315 read access. if fileowner != 0, require no other read
1316 access and group read access IFF the group ownership == 1316 access and group read access IFF the group ownership ==
1317 @@ -721,7 +734,7 @@ pkgdb_is_insecure_mode(const char *path, bool install_as_use r) 1317 @@ -721,7 +735,7 @@ pkgdb_is_insecure_mode(const char *path, bool install_as_use r)
1318 path, fileowner, filegroup, sb.st_uid, sb.st_gid) ; 1318 path, fileowner, filegroup, sb.st_uid, sb.st_gid) ;
1319 return (EPKG_INSECURE); 1319 return (EPKG_INSECURE);
1320 } 1320 }
1321 - 1321 -
1322 +#endif 1322 +#endif
1323 return (EPKG_OK); 1323 return (EPKG_OK);
1324 } 1324 }
1325 1325
1326 @@ -969,7 +982,9 @@ pkgdb_open_all(struct pkgdb **db_p, pkgdb_t type, const char *reponame) 1326 @@ -969,7 +983,9 @@ pkgdb_open_all(struct pkgdb **db_p, pkgdb_t type, const char *reponame)
1327 /* 1327 /*
1328 * Fall back on unix-dotfile locking strategy if on a network fi lesystem 1328 * Fall back on unix-dotfile locking strategy if on a network fi lesystem
1329 */ 1329 */
1330 -#if defined(HAVE_SYS_STATVFS_H) && defined(ST_LOCAL) 1330 -#if defined(HAVE_SYS_STATVFS_H) && defined(ST_LOCAL)
1331 +#ifdef __native_client__ 1331 +#ifdef __native_client__
1332 + sqlite3_vfs_register(sqlite3_vfs_find("unix-dotfile"), 1); 1332 + sqlite3_vfs_register(sqlite3_vfs_find("unix-dotfile"), 1);
1333 +#elif defined(HAVE_SYS_STATVFS_H) && defined(ST_LOCAL) 1333 +#elif defined(HAVE_SYS_STATVFS_H) && defined(ST_LOCAL)
1334 struct statvfs stfs; 1334 struct statvfs stfs;
1335 1335
1336 if (statvfs(dbdir, &stfs) == 0) { 1336 if (statvfs(dbdir, &stfs) == 0) {
(...skipping 754 matching lines...) Expand 10 before | Expand all | Expand 10 after
2091 2091
2092 +if DYNAMIC 2092 +if DYNAMIC
2093 + GENERIC_LDADD+= $(top_builddir)/compat/libbsd_compat.la -lutil 2093 + GENERIC_LDADD+= $(top_builddir)/compat/libbsd_compat.la -lutil
2094 +else 2094 +else
2095 + GENERIC_LDADD+= $(top_builddir)/compat/libbsd_compat_static.la 2095 + GENERIC_LDADD+= $(top_builddir)/compat/libbsd_compat_static.la
2096 +endif 2096 +endif
2097 + 2097 +
2098 if HAVE_ELF_ABI 2098 if HAVE_ELF_ABI
2099 if LIBELF_BUNDLED 2099 if LIBELF_BUNDLED
2100 GENERIC_LDADD+= $(top_builddir)/external/libelf_static.la 2100 GENERIC_LDADD+= $(top_builddir)/external/libelf_static.la
OLDNEW
« no previous file with comments | « ports/perl/build.sh ('k') | ports/subversion/build.sh » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698