diff --git a/SPKG.txt b/SPKG.txt
a
|
b
|
|
89 | 89 | |
90 | 90 | == ChangeLog == |
91 | 91 | |
| 92 | === atlas-3.10.1.p1, lapack-3.4.2 (Volker Braun, Jean-Pierre Flori, 7 June 2013) === |
| 93 | * Trac #14699: Install ATLAS header files |
| 94 | |
92 | 95 | === atlas-3.10.1.p0, lapack-3.4.2 (Jean-Pierre Flori, 26 February 2013) === |
93 | 96 | * Trac #10508: Update ATLAS to version 3.10.1 and LAPACK to version 3.4.2. |
94 | 97 | * Removed patches integrated upstream. |
diff --git a/spkg-install b/spkg-install
a
|
b
|
|
52 | 52 | os.environ['MAKE'] += ' -j1' |
53 | 53 | MAKE = os.environ['MAKE'] |
54 | 54 | |
| 55 | |
55 | 56 | ###################################################################### |
56 | 57 | ### Some auxiliary functions to facilitate IO and error checking |
57 | 58 | ###################################################################### |
… |
… |
|
66 | 67 | return subprocess.call(command, shell=True) |
67 | 68 | |
68 | 69 | def assert_success(rc, good=None, bad=None): |
69 | | if rc == 0: |
| 70 | if rc == 0: |
70 | 71 | if good is not None: |
71 | 72 | print good |
72 | 73 | return |
… |
… |
|
78 | 79 | print 'Error: ', bad |
79 | 80 | sys.exit(rc) |
80 | 81 | |
| 82 | |
81 | 83 | ###################################################################### |
82 | 84 | ### Skip building ATLAS on specific systems |
83 | 85 | ###################################################################### |
… |
… |
|
232 | 234 | |
233 | 235 | shutil.copytree(os.path.join(PATCH_DIR, 'ATLAS-lib'), BUILD_LIB_DIR) |
234 | 236 | |
| 237 | |
235 | 238 | ###################################################################### |
236 | | ### configure |
| 239 | ### configure functions |
237 | 240 | ###################################################################### |
238 | 241 | |
239 | 242 | def configure_options_from_environment(): |
… |
… |
|
423 | 426 | return (arch, isa_ext, archdef_dir) |
424 | 427 | |
425 | 428 | |
426 | | |
427 | | |
428 | 429 | ###################################################################### |
429 | | ### make |
| 430 | ### make function |
430 | 431 | ###################################################################### |
431 | 432 | |
432 | | def make_atlas(): |
| 433 | def make_atlas(target=None): |
433 | 434 | os.chdir(BUILD_DIR) |
434 | | rc = system_with_flush(MAKE) |
435 | | return rc |
436 | | |
437 | | |
438 | | def configure_atlas_library(): |
439 | | os.chdir(BUILD_LIB_DIR) |
440 | | static_library_dir = os.path.join(BUILD_DIR, 'lib') |
441 | | for static_lib in glob.glob(os.path.join(static_library_dir, 'lib*.a')): |
442 | | shutil.copy(static_lib, BUILD_LIB_DIR) |
443 | | cmd = './configure' |
444 | | cmd += ' --prefix=' + conf['SAGE_LOCAL'] |
445 | | cmd += ' --libdir=' + os.path.join(conf['SAGE_LOCAL'],'lib') |
446 | | cmd += ' --disable-static' |
447 | | return system_with_flush(cmd) |
448 | | |
449 | | |
450 | | def make_atlas_library(target=None): |
451 | | os.chdir(BUILD_LIB_DIR) |
452 | 435 | if target is None: |
453 | 436 | return system_with_flush(MAKE) |
454 | 437 | else: |
… |
… |
|
456 | 439 | |
457 | 440 | |
458 | 441 | ###################################################################### |
459 | | ### make and save archdef |
| 442 | ### make and save archdef function |
460 | 443 | ###################################################################### |
461 | 444 | |
462 | 445 | def build_and_save_archdef(): |
… |
… |
|
471 | 454 | assert_success(rc, bad='Making archdef tarfile failed.', good='Finished building archdef tarfile.') |
472 | 455 | for tarfile in glob.glob('*.tar.bz2'): |
473 | 456 | cp(tarfile, ARCHDEF_SAVE_DIR) |
474 | | |
| 457 | |
475 | 458 | |
476 | 459 | ###################################################################### |
477 | | ### build atlas and lapack |
| 460 | ### static libraries functions |
478 | 461 | ###################################################################### |
479 | 462 | |
480 | 463 | def build(arch=None, isa_ext=None, archdef_dir=None): |
… |
… |
|
483 | 466 | |
484 | 467 | Return ``0`` if successfull. |
485 | 468 | """ |
486 | | rc = configure(arch, isa_ext, archdef_dir) |
| 469 | rc = configure(arch, isa_ext, archdef_dir) |
487 | 470 | assert_success(rc, bad='Configure failed.', good='Finished configuring ATLAS.') |
488 | 471 | return make_atlas() |
489 | 472 | |
… |
… |
|
510 | 493 | return make_atlas() |
511 | 494 | |
512 | 495 | |
| 496 | ###################################################################### |
| 497 | ### shared libraries functions |
| 498 | ###################################################################### |
| 499 | |
| 500 | def configure_atlas_library(): |
| 501 | os.chdir(BUILD_LIB_DIR) |
| 502 | static_library_dir = os.path.join(BUILD_DIR, 'lib') |
| 503 | for static_lib in glob.glob(os.path.join(static_library_dir, 'lib*.a')): |
| 504 | shutil.copy(static_lib, BUILD_LIB_DIR) |
| 505 | cmd = './configure' |
| 506 | cmd += ' --prefix=' + conf['SAGE_LOCAL'] |
| 507 | cmd += ' --libdir=' + os.path.join(conf['SAGE_LOCAL'],'lib') |
| 508 | cmd += ' --disable-static' |
| 509 | return system_with_flush(cmd) |
| 510 | |
| 511 | def make_atlas_library(target=None): |
| 512 | os.chdir(BUILD_LIB_DIR) |
| 513 | cmd = (MAKE + ' ' + target) if target else MAKE |
| 514 | return system_with_flush(cmd) |
| 515 | |
| 516 | |
| 517 | ###################################################################### |
| 518 | ### build atlas and lapack static libraries |
| 519 | ###################################################################### |
| 520 | |
513 | 521 | # |
514 | 522 | # Workaround for specific platforms: Disable tuning and go straight to |
515 | 523 | # fast/base architectural defaults |
… |
… |
|
539 | 547 | |
540 | 548 | build_and_save_archdef() |
541 | 549 | |
| 550 | |
| 551 | ###################################################################### |
| 552 | ### install atlas and lapack headers |
| 553 | ###################################################################### |
| 554 | |
| 555 | edit_in_place(os.path.join(BUILD_DIR, 'Makefile')) \ |
| 556 | .replace('.*Make.top install_lib.*', '') \ |
| 557 | .close() |
| 558 | |
| 559 | rc = make_atlas('install') |
| 560 | assert_success(rc, bad='Failed to install ATLAS headers', |
| 561 | good='Installed ATLAS headers') |
| 562 | |
| 563 | |
| 564 | ###################################################################### |
| 565 | ### configure and build atlas and lapack shared libraries |
| 566 | ###################################################################### |
| 567 | |
542 | 568 | rc = configure_atlas_library() |
543 | 569 | assert_success(rc, bad='Configuring shared ATLAS library failed.', |
544 | 570 | good='Finished configuring shared ATLAS library.') |
545 | 571 | |
| 572 | have_serial_libs = False |
| 573 | have_parallel_libs = False |
| 574 | |
546 | 575 | rc = make_atlas_library() |
547 | 576 | if rc!=0: |
548 | 577 | print 'Failed to build serial+parallel shared libraries, possibly because your' |
549 | 578 | print 'system does not support both. Trying to build serial libraries only.' |
550 | 579 | rc = make_atlas_library('all_serial') |
551 | | have_parallel_libs = False |
| 580 | assert_success(rc, bad='Failed to build any shared library.', |
| 581 | good='Finished building serial shared ATLAS library.') |
| 582 | have_serial_libs = True |
552 | 583 | else: |
553 | 584 | have_parallel_libs = True |
554 | | assert_success(rc, bad='Building shared ATLAS library failed.', |
555 | | good='Finished building shared ATLAS library.') |
556 | 585 | |
557 | 586 | |
558 | 587 | ###################################################################### |
559 | | ### install |
| 588 | ### install shared libraries |
560 | 589 | ###################################################################### |
561 | 590 | |
562 | 591 | if have_parallel_libs: |
563 | 592 | rc = make_atlas_library('install') |
564 | | else: |
| 593 | assert_success(rc, bad='Installing the parallel+serial shared ATLAS library failed.', |
| 594 | good='Finished installing parallel+serial shared ATLAS library.') |
| 595 | |
| 596 | if have_serial_libs: |
565 | 597 | rc = make_atlas_library('install_serial') |
566 | | assert_success(rc, bad='Installing the shared ATLAS library failed.', |
567 | | good='Finished installing shared ATLAS library.') |
| 598 | assert_success(rc, bad='Installing the serial shared ATLAS library failed.', |
| 599 | good='Finished installing serial shared ATLAS library.') |
568 | 600 | |
569 | 601 | |
570 | | cp(os.path.join(PATCH_DIR, 'atlas-config'), |
| 602 | ###################################################################### |
| 603 | ### install script to tune and build ATLAS |
| 604 | ###################################################################### |
| 605 | |
| 606 | cp(os.path.join(PATCH_DIR, 'atlas-config'), |
571 | 607 | os.path.join(conf['SAGE_LOCAL'], 'bin')) |
572 | | |